Something new in v4.0.5 for toggling the Timeline of a Symbol without JavaScript?

Hi

One symbol has a timeline that makes an object appear with a fade in (Opacity from 0 to 100) and then it disappears (Opacity from 100 to 0). When the timeline reaches the end, a Timeline Action forces it to resume the timeline from the beginning.

Then I add a button.
Each time I click on the button, I would like that the Timeline of the Symbol starts.
Then I click again on the button, the timeline of the symbol freezes.
Then I click again on the button, the timeline of the symbol RESUMES where it stopped and continues to play the animation.

Is there an easy method for non coders to do it?

Thank you.

Is the button inside the symbol or on the scene?

The button is on the scene, not in the Symbol that is animated.
The red square is the button, but the animated symbol is on the left.

Direct toggle on main timeline
stop-play.hype.zip (13,8 KB)

Using behavior with local symbol timelines
stop-play-behavior.hype.zip (13,9 KB)

Wow, Thank you, I will check these files later and I come back with some feedback.

I have not yet fully tested your files in all conditions but most of the time it works.

Hi. I try to figure out the logic in the stop-play-hype file, in the stop-play Timeline: why the two Actions on this timeline?

A timeline can be used to animate… so far, so good but it can also be used to host Timeline Actions and hence trigger actions. So, the key frames contain such actions. We essentially use the timeline as a progression for pausing and continuing the Main Timeline.

  1. Click on button plays the controlling timeline until the next key frame and stops itself and pauses Main Timeline
  2. Click on button plays the controlling timeline until the next key frame and stops itself and continues Main Timeline
  3. Starts over again…

Since, you asked for a way without (direct) code…

1 Like

if you do not mind including a script in the document head you can use the conditionLinker which enables a setup just using Hypes UI …stop-play_conditionLinker.hype.zip (15.0 KB)

Explained here: HypeConditionLinker: Perform actions based on AND/OR conditions without JavaScript code

that said, couldn’t you just work with two buttons¿!
stop-play_twoButtonshype.hype.zip (14.2 KB)