View Full Version : how do you skip frames
Michael_Knight
January 16th, 2004, 01:27 AM
lets say when a button is released, it will play from frame 1 to 10 then it will skip the 11th frame then go to the 12th frame
btw, the 11th frame has a stop action script on it
thanks
boyzdynasty
January 16th, 2004, 01:28 AM
you can have an "action" on frame 10 that says
gotoAndPlay(12)
Michael_Knight
January 16th, 2004, 01:48 AM
dude not that one, im just recycling the timeline, there's an exisiting animation there for instance when you click on the services button it will play from frame 1 to 11, now what i want is to re use the frame 1 to 10 , ex. when you click on the contact us button it will play from frame 1 to 10 but i will skip the frame 11 then proceed to frame 12. by using the Gotoandplay at frame 10 the services animation will skip to frame 12
hope it make sense...
now my question is what's the action script that i will put in the button so when click it will play from frame 1 to 10 then skips 11 then it will go to frame 12
thanks
kill.robot.kill
January 16th, 2004, 02:01 AM
well I think your best bet would be to put an if statement on frame 10 or 11, which ever frame it stops at normally. something like this:
if(myVar) {
gotoAndPlay(12);
}else{
stop();
}
then in your button put something like this
on (release) {
myVar = true;
gotoAndPlay(1);
}
boyzdynasty
January 16th, 2004, 02:39 AM
i think it is best you use frame labels
Michael_Knight
January 16th, 2004, 03:59 AM
thanks kill.robot.kill
i already use it, works fine =)
Kole
January 16th, 2004, 11:08 AM
would have been easier to do it in scenes then have a goto and play scene blah, then go back to another scene after
kill.robot.kill
January 16th, 2004, 12:08 PM
scenes are a bad idea. I think the reason they originally made scenes was because they invisioned flash as an animation program that would start at frame 1 play, and then stop at the last frame ofyour animation. Scenes under this guise were intended for organization. If you want to do a little test, publish a move with scenes, and in the publish screen go view->bandwidth profiler it will show you what frame you are currently on. But frame 1 of scene three is not actually frame one, it might be frame 13. When flash publishes a movie with scenes It basically flattens the movie and combines all the frames onto one timeline. So frame 10 of scene 2 is now frame 20 of the whole movie. Which means if you are targeting a lot of frames specifically (ie go to 13 and stop) you may run into problems when it is tested, published, or possibly loaded into another swf.
Using scenes is just bad practice. you may find a need to use one, every so often, but I would avoid doing so at all costs.
Kole
January 16th, 2004, 01:50 PM
I shall bare that in mind.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.