Going to a new frame
January 1st, 2008 by awesty
I get a lot of people asking me about this but I don’t think it is worth making a whole tutorial for, so I am just going to write this quickly.
If you want to go to frame 2 when mc1 touches mc2 use this code:
if(mc1.hitTest(mc2.)){
gotoAndStop(2);
}
gotoAndStop(2);
}
If you want to frame 9879 when the enemy has no health left use this code:
if(enemyHealth <= 0){
gotoAndStop(9879);
}
gotoAndStop(9879);
}
If you want to go to a new frame when a button is pressed use this code:
on (release){
gotoAndStop(someframenumber);
}
gotoAndStop(someframenumber);
}
Now please stop asking me this question. I have been asked sooooooooooooooo many times.
Filed under Flash Tutorials















No comments yet.