jacynnoru Posted July 20, 2012 Share Posted July 20, 2012 I have a sign with an action I want to play 5 frames and stops, and I have another gesture I want to play 5 frames in reverse function fl_SwipeToGoToNextPreviousFrame_22(event:TransformGestureEvent):void { if(event.offsetX == 1) { TweenMax.to(mc_pan,1,play); } else if(event.offsetX == -1) { TweenMax.to(mc_pan,1,reverse); } } Link to comment Share on other sites More sharing options...
Carl Posted July 21, 2012 Share Posted July 21, 2012 Hi, Not sure if I am clear on the situation but if the question is "how do I play through a movie clip's timeline for 5 frames?" Use the frame plugin (see the plugin explorer) and http://www.snorkl.tv/2010/10/overview-of-tweenmax-framelabel-and-frame-plugins-nifty-way-to-play-a-flash-timeline-backwards/ The following code will play through to frame 30 of mc's timeline for 1 second. TweenMax.to(mc, 1, {frame:30}); I think that should help Link to comment Share on other sites More sharing options...
jacynnoru Posted July 25, 2012 Author Share Posted July 25, 2012 no, i want to play only 5 frames for click play 5 frames and stop, another click to the same button an play 5 frames again and reverse Link to comment Share on other sites More sharing options...
GreenSock Posted July 26, 2012 Share Posted July 26, 2012 I assume you mean something like this: TweenMax.to(mc_pan, 5, {frame:"+=5", useFrames:true, ease:Linear.easeNone}); And to go backwards, use "-=" instead of "+=" before the 5. That must means it is a relative tween rather than absolute. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now