Pause Symbol Timeline with Main Timeline?

I have avoided using Symbols up until now, so am clueless as to their machinations. I have a symbol that plays. Half way through the symbol’s animation I need both the Main Timeline and the Symbol’s Timeline to pause, then once the “Continue” button on the Main Timeline is clicked both timelines should continue. The Action on the “Continue” button is, Continue Timeline/Main Timeline.

This doesn’t work. How do I get it to advance both? Thanks.

Here’s a sample file to see if this is what you are looking for. The bottom rectangle is a Symbol with its own timeline, the top rectangle is not a Symbol and it is on the Main timeline. The button has two “on click” actions to continue both timelines.

pause.hype.zip (13.2 KB)

Ahhh, so you just created another Timeline, but that timeline only runs inside of the Symbol? I was reading the documentation and they kept referring to controlling the other Timeline, but couldn’t figure out where to control the Symbol’s timeline. Thanks Greg!

Next problem, the Timeline I created ‘Fill-In’, only shows up when I am inside the Symbol. When I try to create an Action to the button (which is on the Main Timeline) I don’t see the ‘Fill-In’ Timeline as a choice… what did I do differently?

Could you upload a sample?

Depending on the complexity of your timelines in the symbol, Custom Behaviors may be a good solution. What you would do is:

  1. In the Scene, create two Custom Behaviors. I’ll call them “playIt” and “pauseIt”. Have these play the main timeline and pause the main timeline respectively
  2. Enter the Symbol, and in the Symbol Inspector, do the same thing - but this time have them play/pause the symbol’s timeline (or symbol’s Main Timeline)
  3. Add a Timeline Action in the Symbol’s timeline at the point you want it to pause that will Trigger Custom Behavior “pauseIt”
  4. Have the Continue button Trigger Custom Behavior “playIt”

Because both the Scene and the Symbol respond to Custom Behaviors of the same name, they’ll both run their actions to play/pause their timelines.

5 Likes

Thank you! I never would have gotten that on my own, very clean explanation.
The only thing I would add as an edit for clarity (which you did at the end) is mentioning in Step 2 that you should name them “playIt” and “pauseIt” there as well, I caught that at the end when you mentioned it, but had named them differently originally.
My symbol didn’t come into play until later in the animation, so I had to put a few false pauses in the front of the Symbol timeline so that the Continue button would not advance actions that weren’t showing yet.
Thanks again Jonathan, very appreciated!

This thread is done … still I think this little comparison (see link) might help to grasp the concept of custom behavior for good (if you haven't done so already). I often use it to explain the broadcaster listener pattern to people.

Regards

2 Likes

Glad that helped - you’re right I should have called out the names need to be the same!

1 Like

This topic is still relevant. This seemingly simple example really cleared up the confusion for me. Thanks.