Button that is inside a persistent element to perform an action on a timeline outside of it

Is it possible for a button that is inside a persistent element to perform an action on a timeline outside of it?

Example:

I have a button that is inside a persistent element and needs it to perform a “continue timeline” action on a timeline outside this element …

Can someone help me?

You can do this with custom behaviors:

  1. Outside of the Symbol (make sure you exit it), create a new Custom Behavior (at the bottom of the Scene Inspector).
  2. Inside of your persistent element (I think you mean persistent symbol?) you can then create a mouse click > Trigger custom behavior action. In the dropdown, select your custom behavior.

The Scene where you originally created your custom behavior needs to be shown. You could also of course create custom behaviors across persistent symbols if you want the action to work on any scene where those two objects are present.

1 Like

The problem is that I do not know how to do this custom behaviors … I do not know much about javascript. Are there any examples that I can see?

It is not Javascript.

Follow @Daniel 's instructions.

Select to Add a new Custom Behaviour. Name it and give it the continue timeline…

Scene Inspector

Then in the symbol, give the button a on click action and choose Custom Behaviour. Then either type the name you gave or choose it from the selection.

Inside Symbol Actions Inspector - for button

CustomBehaviourFoo.hype.zip (14.3 KB)

That should be it.

1 Like

I’ll try! Thank you!

Added, images and example above…

All right! Worked perfectly. One more learning. Thank you Daniel and MarkHunte.

1 Like

an image is worth a thousand words! :smiley:

1 Like