Jump to content
Search Community

Frame by Frame controller

pbohny test
Moderator Tag

Recommended Posts

I have a problem I would like some advice on:

 

I need to write a function to step trough a timeline frame by frame. Nested in the target timeline (mainTimeLine) are other timelines (e.g. childTimeline) with tweens. I have set useFrames of mainTimeline to true and play/stop myself trough the mainTimeline frame by frame. That works fine, but a soon as the label where childTimeline is inserted comes up, childTimeline starts playing the full timeline. What would be a solution to sync the childs frames with the parents frames. The same happens, when I play the mainTimeline and stop it in the middle of the nested animation, the nested one continues playing. So how to pass the stop() to the nested timeline?

Link to comment
Share on other sites

When you say "nested timeline", you're not talking about a TimelineLite or TimelineMax instance, right? You mean a MovieClip timeline, right? So this isn't a question about GreenSock code but rather the way Flash works with MovieClips in general, right? (I just want to make sure I understand your question correctly before posting an answer)

Link to comment
Share on other sites

Oh, then yes, their frames will always be synchronized. If you don't think they are acting accordingly, please post an example FLA that demonstrates the issue (the simpler the better please, and don't forget to zip the file(s) before posting)

Link to comment
Share on other sites

  • 2 weeks later...

Oh, right - you created a separate and distinct tween that is NOT a child of your TimelineMax instance so it is (and should be) unaffected when you stop() or reverse() your TimelineMax. It is working properly. If you want it to be nested inside of your timeline, then you must insert() it (or append() or prepend()). For example:

 

timeline.insert( TweenLite.to(box1,2,{width:250, height:300}), timeline.currentTime);

 

But be careful because the way you're structuring your code could allow a tween like that to be added multiple times (like if I go past the callback, hit rewind, go backwards past it, click play play, etc.). Not that it will necessarily break things, but it's wasteful.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...