-
simple gotoandstop help
ok i havent done flash in for ever, so im just now getting back into it, and ive forgoten so much...
Code:
stop();
ball.onPress = function(){
ball._x = Math.random()*600;
ball._y = Math.random()*600;
ball._width = 25 + Math.floor(Math.random()*41);
ball._height = 25 + Math.floor(Math.random()*41);
hits++;
}
time = 5;
clearInterval(idsetInterval());
id = setInterval( function(){
time--;
},1000);
if (time == 0){
gotoAndStop("Scene 2", 1);
}
everything works, except the gotoandstop, once time hits 0, it goes into negitives, and it stays at the current frame. help please :)
-
try -
PHP Code:
id = setInterval( timeout, 1000);
time = 5;
function timeout(){
time--;
if (time == 0){
gotoAndStop("frame_label");
clearInterval(id);
};
-
oright that worked, thanks