Adding a Delay to Triggers (for SWF Publish)

I'm trying to add a delay to when a trigger occurs.

I've tried adding a 5sec audio file (and triggering off of that), works great in browser.  Doesn't work in SWF.

I saw a JavaScript Phil Mayor had posted for something similar, but could not get that script to work.

What is the best way to delay a trigger if publishing as SWF?

If Javascript is the answer, I need the code for a 5sec day.

Thanks!

13 Replies
Art Smith

Josh,

Your suggestion seems like the right answer, however....

I don't understand why it is not working for me.  

Ok, here's what I'm doing...

1. I show layer1 upon click of a button on the Base Layer of the Slide.

2. The layer must show because I placed a test var to change at the start of the layer timeline (and the var changes), but the var that should change at the end of the timeline, never changes.  I've verified I have var names correct.  It seems like the timeline it not moving. 

3.  I added a shape to the layer and the shape does not appear on the slide either.  Very strange.

This can't be so difficult.  What am I missing?

Steve Flowers

Hey Art - 

I use dummy objects on the timeline. I use these offstage all of the time to delay triggers. You can even use objects as containers for trigger sets, treating these objects as "functions" that you can call over and over. 

One thing that's common when triggers don't seem to work. Make sure the When: is set to When the timeline starts on the object that you want to attach the delay. Triggers tend to pick up the last event setting you used. So it can commonly be set as On Click by default. Your trigger would never fire.

Mind posting your example file. Should be able to work through it. 

Art Smith

Need more help...

This is working....as long as I play in a browser. 

What I am actually doing is, playing on an Android Tablet, using a SWF Player.  Everything works well, buttons (without JavaScript), speed slides transition, until I select the button that requires multiple actions based on time delays (no JavaScript).

In the SWF Player, it's like there is NO delay at all, every action happens instantaneously.  I can see the actions occur, all within a second or so.

How do I get time delays built in the story if I'm playing on a SWF Player? 

I also resorted to playing in Firefox Beta with Flash installed.  That fixed the timing problem, but now anything with JavaScript is not working.

Any other work around?

I there a way to make html5 work on android?

Eric Isaksson

Steve Flowers said:

I use dummy objects on the timeline. I use these offstage all of the time to delay triggers. You can even use objects as containers for trigger sets, treating these objects as "functions" that you can call over and over. 


Hi Steve, I don't quite understand how you mean. Could you please expand on that?

Josh Uhlig

Eric,

The trick is to place an object, such as a square or circle, off of the viewable area of the slide.  You can then add triggers to this object's timeline.  For example you could have the object's timeline set to appear 5 seconds into the slide's timeline, and dissappear at 10 seconds.  You could then add triggers when the object's "timeline starts" or "timeline ends" to do pretty much anything.  The objects aren't visible to the learners since they are off screen, but it is a nice way to cause things to happen at specific points in the slide's timeline since there is no option to pin a trigger to a timepoint.