Hello all,
I am hoping someone has done this before - basically I have an animation stored in a movieclip. I have 5 instances off this mc stored off the stage. Whenever the user enters a wrong response, one of the mc’s play a walk animation and a person ‘walks’ onto the screen. After moving 80 pixels, an if function in the onEnterFrame deletes the onEnterFrame.
However, if the user enters more then 5 wrong answers, the persons start a new animation. The problem is that if the user gets a question wrong before the person has finished moving - the person stops and does the new animation.
Thus I was hoping to use setInterval after a check to see if anything is moving. Yet it doesn’t see to work. My traces show no delay between the interval trace and the trace after the interval.
Here is a section of my code; basically when k = 6, the fifth person has been called previously and the moving variable is a boolean set to true. But when run, there is no 20 second delay, it just says ‘slow’ then ‘delay’ and then kicks into the final animation.
if (k > 5){
trace(person5.moving);
if (person5.moving){
trace("slow");
slow1 = setInterval(blank(),20000);
}
End();
}
function blank(){
trace("delay");}
In the end, I was hoping to have the script wait until the end of the last persons animation (when it stops walking) and then play the new animation. Any suggestions?
Thank you,
Cedwyn