scoring in flash mx help

12 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???

 
Flag Post

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

 
Flag Post

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

 
Flag Post

to you know any places to look???

 
Flag Post

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

 
Flag Post

score++;

 
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

 
Flag Post

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

 
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.
 
Flag Post

no it didn’t work thanks anyway

 
Flag Post

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

 
Flag Post

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