this should work....why doesnt it??!! simple actionscript problem
hey guys any ideas???
hey, im making a little flash game where the user has to click the right square to make the shape symmetrical. the actionscript in the first frame is as follows:
stop();
//ok, 'lives' is a dynamic text box which displays the amount of
//tries the user has left
//'last' is a movie clip that contains text saying "last chance"
if (lives eq "1") {
last._visible = true;
}
//'lost' is a movie clip that contains the text "wrong etc etc"
if (lives eq "0") {
lost._visible = true;
gotoAndStop("15");
}
//the 'tick' and 'c1' to 'c10' are the crosses or ticks that show if
//you click the right or wrong square.
ok, heres what isnt working, if the user has 1 try left the mc "last" doesnt become visible, and when the number of tries is 0 the movie doesnt jump to frame 15!!!
in the second frame i have the following code which all works fine:
Well you'd still need to take out the double quotes, but also need to put your if statements in a loop, so they execute more than once, as they are not set to do...
managed to come up with a work around, i put the if statement on the buttons instead so it checks the score each time a button is pressed and therefore doesnt need to be in a loop.
however, i would like to know how to write loops so if anyone could either point me in the right direction or alter the above code into a loop so i know for next time i would be very grateful.
thanks for any help
david
Last edited by daveyt11223344; 10-21-2004 at 11:13 AM.