The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsI'm making a new game and I need the code to show the score the person who plays has. I haven't done flash in a long while, so I forgot. Please remind me. Thank you.
u just draw a text box, give it instance name and say textbox.text = score
Kill zombies http://www.newgrounds.com/portal/vi ew/503827
Manage a smoke shop. http://www.newgrounds.com/portal/vi ew/507244
Aim-Jereminion
Assuming you have a variable called score, put this code in the same spot as where you declare that variable:
_root.sct.text = score;
Then make a dynamic text box somewhere on the frame and give it the instance name of
sct Ok, how about to add a score when you release a button?
on(release){
score ++;
};
At least try to learn ActionScript before asking.
At 7/14/09 11:01 AM, Bumbanut wrote: Ok, how about to add a score when you release a button?
well it really depends on how much score you want to add so
on(press){ OR on (release) { - depends on what you want
score += (whatever score you want to add, if it's just one then put ++);
}
As stated above, this would work using AS2:
On the timeline:
var score:Number = 0;
On your button:
on (release)
{
_root.score++;
}
Also, by the way, there isn't "the code" to do something, there are several different methods to accomplish tasks.