|
-
[F8] [help] if else and score stuff
Im trying to set up a little game for a friend's website. The idea is simple enough, I've got a movie clip that swings and for every swing completed by the player it adds to the score.
That works fine, what im having difficulty with is that I want a series of buttons to appear as the player acheives a higher swingScore. This is what I have at the moment on the first (and only) frame:
_root.swingScore = 0;
if (_root.swingScore>=40) {
button4._visible = true;
} else if (_root.swingScore>=25) {
button3._visible = true;
} else if (_root.swingScore>=15) {
button2._visible = true;
} else if (_root.swingScore>=5) {
button1._visible = true;
} else {
button4._visible = false;
button3._visible = false;
button2._visible = false;
button1._visible = false;
}
Now the buttons disapear fine, but getting them to reappear is a bugger. The score reads the necessary amount but the buttons won't appear. Ive tried a few different things like putting the buttons on different frames and using "goto" but that doesnt work either.
Any ideas guys?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|