Pause timelines within symbols but not using buttons


(Carola Clavo) #1

I’ve been trying and searching old topics but can’t find a solution. I need to pause the main timeline along with 2 timelines inside 2 symbols, but I’m not using any buttons. I just want all the timelines to stop at the same time.

I created an ad 9 seconds long that loops 3 times using a Javascript placed in the main timeline and then pauses at second 7 with another script placed in the main timeline, so when the ad stops looping all info will be visible in that precise moment.

But the discount is an animated symbol that plays in advance and later in reverse, and when the main timeline is paused, the symbol animation goes on independently and you can’t see the discount anymore :smiley:

I tried to pause all the timelines in the script but to be honest I didn’t know how to do it and everything I tried failed. I discovered custom behaviours and I understand how it works but I’m not using a button to trigger the symbol timelines to pause. I just want the symbol timelines to pause at the same time the main timeline pauses but I’m struggling to achieve this.

Can it be done?


#2

I modified my previous custom behavior.The button just starts the action. Maybe this can help you you?
custom behavior pause.hype.zip (17.6 KB)


(Carola Clavo) #3

Hello Djon, thank you! :smiley:

So sorry, there can’t be no start or stop buttons as this is an advertising piece. It starts when scene loads, repeats three times, then everything stops after three loops in a certain spot - but the symbols continue until the end of main timeline.


(Rick) #4

Argh… :stuck_out_tongue_closed_eyes: I just wish people would upload their file. It’s SOOO much easier to see then if I can help or it’s over my head and someone more advanced needs to step in.

(Can someone make a sticky for that please?)

Anywho, :grin: Not sure if I can help but ok, here it goes. You write you just discovered ‘custom behaviours’ but don’t want to use buttons to trigger. You don’t need to. pauzeSymbol_from_maintimeline.hype.zip (12.7 KB)

Main timeline starts a timeline in the symbol and stops it too. Hope it helps, if not my apologies. :innocent:


(Carola Clavo) #5

I’m sorry, I didn’t want to share the file since it’s kind of confidential, but I will edit out some details if needed to share it.

As per your post, it looks like what I needed to do! I’ll take a look this morning, it is much, much appreciated. Thank you :smile: I’ll share the document with you all if I can’t get it to work to help you help me. Big thanks again.


(Mark Hunte) #6

For the Javascript you will need to get the symbol instance and pause it’s main timeline.

You have to use the symbol timeline API and not the normal ones.

Or use a custom Behaviour trigger in the Timeline action instead of the button.


(Carola Clavo) #7

I got it!! I added a timeline action in the main timeline that triggers a custom event that pauses the symbols :smiley: I managed to create a custom action with a pause inside a symbol.

But I don’t understand… Why does it work in all scenes if I only added it in the first one? And where are the custom behaviours placed after you create them? I can select it to add it as a custom behaviour but then, where is it to edit or change it? And why did it work with both symbols in my scene? The two symbols are vertical and horizontal distribution for the discount info, so they are shown / hidden depending on the scene (portrait or landscape scene).

I think that while I did it, I’m not quite sure of what did I do :sweat_smile: Here is the file for anyone to play with or consult in the future!
Promotion-v2.hype.zip (1,1 MB)


(Mark Hunte) #8

Not looked at the file but…

A Symbol needs to be duplicated to work as an indivdual instance.
If you just copy a symbol and edit any one of the copies, All copies will change. The best way to look at them when editing and setting up is they are legion…, ok bad joke. They are all ponters to the same object but can be displayed as many.

Duplicating one will break off a version which can be edited.

The custom behaviour remains where you set it up and can be changed there, This will be on the Symbol Inspector in this case.

Once you create a CB it becomes avalible in the action Inspectors or Keyframes. You cannot edit there.

They do take a bit to get you head around

Again.

Look at custom behaviours as a worm holes to a symbol or scene.
It bypasses all the normal roots to symbol or scene allows you to tunnel directly to the symbol/scene and get it run actions ( set in the CB )

You first setup a custom behaviour in the Symbol or Scene.
And then from amother scenes link to it via selecting it in the actions.

It is best you look at Symbols in the Docs.


(Carola Clavo) #9

I have two symbols. Both have the same elements but arranged in a different distribution so one of them fits vertical design and the other fits horizontal design. I need those elements to be symbols, this way I can edit just two elements and have all the file updated instead of manually changing the element a dozen times. I then repeated creating the CB in my document so it works again just as well as the example document I shared with you.

But since I did create the custom behaviour in one of the symbols, I don’t fully understand why the behaviour affects both symbols but I guess it affects all of the symbols in the document?. I’ll take a look again to Documentation to better comprehend its details. :slight_smile:


(Mark Hunte) #10

I assume you dragged and dropped the

cta_en symbol from the resources on to many scenes. This is called a ‘Copy’

When you do that, if you then edit any one of the copies. You edit all when it comes to editing a symbols elements,Action,Timelines,Custom Behaviours etc…
Not its placement on a scene.

If you use the Duplicate Symbol ( cta_en 2 ) is a duplicate , note the Duplicate button.

then you create a brand new version that will not follow the editing of the original it was spawned from. This called a ‘Duplicate’

But any copy made from it ( Not duplicate) will follow and be followed in editing of that new original.


(Carola Clavo) #11

The symbol CTA was a persistent symbol and it is the same within all the document, also the animation is dispensable. It really doesn’t matter much if it’s showing or not as long as the button is showing when the main timeline stops.

The symbol that bothers me more is the dto symbol, which I edited in two different versions, portrait (v) and landscape (h). The problem is that I used the symbol in reverse so it appears and dissapears, but I wanted it to remain visible and stop before it plays in reverse and goes away; otherwise when the timeline finally stops, you wouldn’t be able to see the discount.

In order to create a different version of my symbol, I entered the symbol that was already created, copied the elements inside the symbol and then pasted them outside the symbol, in the scene. I did it this way to copy the animations just the same as the original symbol.

Then after I edit the placement of the elements and I made those elements a new symbol. Then I maybe copied it into the scenes and hidden one or the other as needed.


(Mark Hunte) #12

Sorry did not check it’s type. Mainly because it is hard working through a complex project.
But what I say remains the same even for persistant symbols.

If I get a chance later I will have a better look…


(Mark Hunte) #13

Is this what you are looking for.

This just moves everything off the Main Timeline. Which give better control.

We have timeline anim which runs everything as you had it apart from starting the symbols.

The symbols starts are on timeline dtos. with an action at the end to start again.
It runs the stop() code.

Both code functions have been updated.

Doing it this way allows us not to have to delve into the symbol instance…
Promotion-MHv1.hype.zip (1.1 MB)


(Carola Clavo) #14

I now see it! So the stop script also stops other timelines. This is what I was looking for, the way to stop more than one timeline. This works fine for me, thank you!!