This content has been marked as final. Show 6 replies
create a movieclip and place each of your 84 images on one frame of that movieclip's timeline. ie, the first image will be on frame 1, 2nd image on frame2 etc. place your movieclip on the main timeline and give it an instance name, say apMC. you'll probably want to put a stop() in its first and last frames.
then if you have forward and backward buttons with instance name forwardBtn and backwardBtn on the main timeline, you can use:
Thanks! I'll try it and let you know how things go, or if I have questions.
I (think) I followed your instructions. The airplane rotates fine when the forward button is pressed, but nothing happens when the backward button is pressed. I’ll describe exactly what I did, in case I did something wrong.
1. I drew a small dot off stage, made it into a movieclip object, and gave it the name apMC.
2. On the movieclip timeline, I created a keyframe for each photo and dragged the photos from the library onto the keyframes. I placed a stop() code on the first and last movieclip frames.
3. On the main timeline, I created three layers:
“Movieclip”: Onto the first frame of this layer I copied/pasted the code that you provided.
“Buttons”: I created the forward and backward buttons, giving them the instance names you suggested.
Any thoughts as to why the backward button doesn’t work? If you wish, I could send you the .fla file to examine. If so, let me know where to send it.
delete that dot. it serves no purpose.
your backward button needs to be a movieclip button. true buttons don't have onEnterFrame methods.
I see! Thanks!
I changed the code on the last movieclip frame from stop() to gotoAndPlay(2) so that when the plane is rotating forward there is no stop in the action when the last frame is reached.
With the change you suggested, now the airplane rotates backward when the backward button is pressed. However, the action stops when the first frame is reached.
Is there a way to modify the code so that, when using the backward key, the rotation can continue beyond the first frame, the way the action continues beyond the last frame when the rotation is forward?