Flash Code Help! (for the genius)?

answers4u

New member
Ok so here is my code.....

stop();
score=0;

timer = 5;

countdown = function(){
timer--;
if(timer==0){
clearInterval(countdownInterval);
}
}
countdownInterval = setInterval(countdown,1000);

(everything is right until here)

if (_root.timer=0)
{_root.gotoAndPlay(5);
}

I am making a simple game and I want the code to take the gamers to the lose screen once the time runs out. (which is scene 5) what is the correct code for this??
 
I believe your coding should state at the end

if (_root.timer==0)
{_root.gotoAndPlay(5);
}
else()
{
(continue your cosing here...)
}


I am not positive without seeing all your coding in order to be able to troubleshoot it properly but usually you have an else statement when you have an if statement. Also you may want to give SwishMax a shot at it. You can download it for free and use it for 30 days or more to make whatever you want with no restrictions.

That should help a lot because it has an excellent help community with all sorts of extra stuff and help from ALL angles... plus tutorials up the ying yang...
 
Back
Top