How do I instruct a button to play a specific range of frames (i.e. "play from frame labelled X to frame labelled Y")
I'm sue this is very basic, but I cannot find the answer anywhere. I am making an HTML5 canvas doc.
Thank you to any who can help.
I'm sue this is very basic, but I cannot find the answer anywhere. I am making an HTML5 canvas doc.
Thank you to any who can help.
Thank you! I will try this.
But, from your subtle tone
, I'm thinking I've set out to do this is in a dumb way? Is there a better way to do it?
"It" being (I'm rounding all numbers etc for simplicity sake):
1) Allows the user to watch all ten animations, in order, straight through (play button)
2) Allow the user to skip to the next or previous animation, and just that animation (next, previous buttons)
3) Allow the user to skip directly to any individual animation, and just that animation (go to x)
Thanks. You've helped a lot already so if not in the mood to keep going that's totally fine, I get it, and I appreciate the responses already.
I thought of a safer approach, for the case where you want to either play one animation or all animations. You could have. variable that you test. On the last frame of each animation you have this:
if(playone) this.stop();
Then, when you tell them to play one animation you do this:
playone = true;
this.gotoAndPlay("animation 3");
Animation 3 would play, and it would stop on the last frame of that animation. If you want to play all animations you would do:
playone = false;
this.gotoAndPlay("animation 1");
The last frame of the last animation would have:
this.stop();
so that it stops whether you were playing one or all animations.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.