Triggers executing too early in HTML5 player

Nov 13, 2013

I've got some custom JavaScript that needs to execute at the beginning of my slides (code is unique to each slide).  I put Slide Triggers in place: "Execute JavaScript When the timeline starts."  In Flash, everything works as expected.  Unfortunately, in the HTML5 version of the player, premature execution of the JavaScript occurs, maybe as part of pre-loading?

Here is the behavior:

  • The first slide executes its JS twice followed by the second slide.
  • The second slide executes the first, second, and third JS (in that order).
  • The third/final slide executes the second and then third JS.
"on timeline start"?!  Something is broken with the HTML5 version or my expectation for this trigger's behavior needs correcting.

In an effort to thwart the premature execution, I put conditions on the trigger: "If currentSlide is equal to A", for instance.  "currentSlide" is a project variables set first in the slide triggers to match the Execute JavaScript trigger's condition.

I created a test Story file (attached) for anyone interested in witnessing this behavior yourself.  Publish HTML5 and open story_html5.html to see the result.  (I tested and see the issue in both Chrome and IE9.)

Thanks for looking.  I hope we can figure this out.


4 Replies
Justin Grenier

Good Afternoon, Andre.

We've had similar reports of prematurely-executed triggers in our HTML5 output (SL-14119 for my reference), and the Articulate Quality Assurance Team is currently investigating.

One of our clients shared with us that separating the three slides into 3 different scenes seems to be an effective workaround, and we also understand that placing an extra disguised slide between the problematic slides may help.

Can you please confirm whether or not either of these two tactics seems to be an effective workaround in your course, so that I can share this information with our team?  Thanks!

Andre Van Looveren

Thanks, Justin.

I don't think that separation of "neighboring"/consecutive slides into scenes or insertion of extra slides would be feasible.  We have code executing on nearly every slide, so this would be very invasive.

I think that there is a bug that needs to be fixed, as I will now add to the above problem (omitted previously for brevity).

Web Object URLs on the neighboring slides are also being called prematurely.  That is, when I navigate to the slide prior to one having a Web Object, I see that the URL of the Web Object is being called.  (I use Fiddler, but I imagine any decent browser dev tools may also show evidence of this HTTP traffic.)  The URL is called an additional time when its slide is shown.  The issue with our URLs being called prematurely is that there is a time limit to user interaction with the page that is called (which isn't aware that it is not displayed to the user).  Even the number of calls to the URL is limited, so wasting them on a pre-load is unacceptable for us.


Andre Van Looveren

It appears that updating Storyline to 1.4 fixes the issue with the premature JS execution and Web Object loading.  That's the good news.  Unfortunately, in HTML5 version, the Web Object no longer loads at all.  It seems that perhaps one issue was replaced by another.  Thanks for reminding me to post updates here for the benefit of others.

This discussion is closed. You can start a new discussion or contact Articulate Support.