Global custom behaviours


(John Cook) #1

Is there any way to have global custom behavious for a whole project so that are available to call from ANY slide. I have a navigation bar which is buttons within a symbol so has to use custom behaviours to control the main timeline but I dont want to have to add these custome behaviours to each slide manually.

Cheers

John


(Mark Hunte) #2

I think you need to make them or the navigation bar a persistent symbol so that they will stay in place for each scene.
Read the documentation on symbols


(John Cook) #3

No its not that this is the problem. Putting the control on every page is fine.

I have a slide with four bullet points and pause actions placed on the Main Timeline just before each of these points starts.

I have a symbol called Navigation which contains five buttons and a rectangle border all grouped together and it appears on each page.

Previous - Action on Click = Continue timeline in reverse (Main Timeline) - Works fine
Next - Action on Click = Jump To Scene, Next scene - Works fine
Pause - Action on Click = Pause time line (Main Timeline) - DOES NOT WORK
Play - - Action on Click = Continue Timeline (Main Timeline) - DOES NOT WORK
Sound icon (not worked on this yet.)

I ve worked out that the ones than don’t work need to call a custom behaviour ( because button actions within a symbol treat the symbol timeline as the main timeline) but that means as adding a pause and contine custom behaviour to each and every slide.

Can anybody suggest an GLOBAL way to have a custom behaviour rather than adding to all slides individually

Cheers

John


(Hans-Gerd Claßen) #4

you should offer a sampledocument for download to give someone the chance of understanding your problem …


(Andrew) #5

Have you tried triggering with Javscript, if you do this on app load, or the first scene, with what you want the trigger to be, you could do this:

hypeDocument.triggerCustomBehaviorNamed('customBehaviorName');

As it is on the load, you could do something like

$('#<div container that holds button>').on('#click', '#button', function({
    hypeDocument.triggerCustomBehaviorNamed('customBehaviorName');
});

This is using JQuery :smile:


(John Cook) #6

Thanks for posting…

Ill need to look at that MrAddy…looks complicate for a JQuery no-nawt!! :expressionless:

See attached file for example file…point taken :smile: …you’ll see the white buttom on slide 2 works pausing and playing but the play & pause buttons contained within the navigation symbol don’t…the go to next /prev slide DO work though!!

Sample.hype.zip (1.7 MB)


(stephen) #7

Custom behaviors can be added to scenes or to symbols.

In your case you can add the custom behaviors to the persistent symbol so they will be available on any scene the persistent symbol is on.

Double click to edit the symbol and go to the Symbol Inspector and add your custom behavior there.