Actionscript 2 wait
Got a major problem! For school I need to design a game in Flash, so I'm making my own version of Frogger. When my frog gets hit by a car, I want a short animation (1/2 seconds) to show, and the entire stage reset after that. Now there are 2 things here I can't figure out.
The first is a wait command. I want the player to be unable to give any input while the animation runs, so I need a wait command which executes before the dying animation starts. I've been Googling for ages but I can't find any solution (just lots of really specific answers involving a wait command).
The second problem is the stage reset. At the moment I have
if(kikker_mc.hitTest(auto1_mc)){
loadMovieNum("FROGGERYEAH.swf",0);
}
where kikker_mc is the player, auto1_mc the car that runs you over, and FROGGERYEAH.swf the actual movie. This all works fine, exept for that it looks a bit sketchy and the window restores to it's original position if you've moved it.
If someone could help me with this it'd be great, because I need this done for school before end of the week!!!
The first is a wait command. I want the player to be unable to give any input while the animation runs, so I need a wait command which executes before the dying animation starts. I've been Googling for ages but I can't find any solution (just lots of really specific answers involving a wait command).
The second problem is the stage reset. At the moment I have
if(kikker_mc.hitTest(auto1_mc)){
loadMovieNum("FROGGERYEAH.swf",0);
}
where kikker_mc is the player, auto1_mc the car that runs you over, and FROGGERYEAH.swf the actual movie. This all works fine, exept for that it looks a bit sketchy and the window restores to it's original position if you've moved it.
If someone could help me with this it'd be great, because I need this done for school before end of the week!!!
"com_maxfps 100;+forward; +moveup; wait 2; -moveup; wait 70; -forward; wait 89; +sprint; +forward; wait 9; +moveup; wait 135; -moveup; -forward;-sprint;com_maxfps 100"
i used this:
var count = setInterval(timelulz, 1500); //millisec -> 1,5sec
function timelulz() {
gotoAndPlay(2);
clearInterval(count);
}