scoring in flash mx help

Subscribe to scoring in flash mx help 12 posts

avatar for phore_eyes phore_eyes 427 posts
Flag Post

i want to make it so that once you get to a certan frame your score goes up i have absolutly no idea how to even set up any type of score can anyone help me???

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

also i need to make it so if you go there again it dosn’t count

 
avatar for Janck Janck 253 posts
Flag Post

You use a combination of variables and problem solving skills.
You might want to look up an actionscript tutorial.

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

to you know any places to look???

 
avatar for Janck Janck 253 posts
Flag Post

http://www.flashwiki.net/index.php?title=Main_Page

 
avatar for Nabb Nabb 1002 posts
Flag Post

score++;

 
avatar for JudeMaverick JudeMaverick 8844 posts
Flag Post

First, initalize the score variable by:

score=0;

And then, an event must happen to add 1 to a score so:

onClipEvent(enterFrame) {
//blablabla, Greg isn't awesome, face it.
score++
}

If you want to add a number like 5, change it to: score+=5.

Before Indie starts to shout at me, I’m lazy to use AS 2.0 :P

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

sweet thanks
but how would i get it to show the score smoewere

 
avatar for Nyde Nyde 25 posts
Flag Post
One way of displaying dynamic information is by creating a Dynamic Text box using the Text tool: 1) Pick the *Text Tool* from your Tools panel 2) Draw a textbox in your stage using the *Text Tool* 3) Format the text to whatever you want (font style, size, color, etc) 3) Select your textbox --> and then in the Properties panel, select *Dynamic Text* in that drop-down 4) In the *Var* field of the Properties panel, type the variable name you want to display (in our case, the variable name is score). to test if it works place this code in the first frame of your timeline: ----------- bq. score = 12; //this assigns 12 to score and if you did it right, your text box should display 12. ----------- Let me know if that works out for you.
 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

no it didn’t work thanks anyway

 
avatar for phore_eyes phore_eyes 427 posts
Flag Post

sweet i found it out you have to add root_score
in the text variable box

 
avatar for JudeMaverick JudeMaverick 8844 posts
Flag Post

If it works, it should say 0 or the number you inputted. If you added a string, the same rules apply.