Executing Javascript with Adjust variable listeners

Jun 11, 2014

I have some slide-level navigation graphics on a series of slides and they listen for "adjust variable" (each graphic listens for a separate variable). I use "Execute JavaScript" when timeline starts on each slide that programmatically adjusts those variables. It works PERFECTLY in HTML5 output but not in Flash. Is there any insight that either you or anyone else can provide on why this is happening? I'm not using the Master Slide for any of this. Also, I've tried executing the Javascript a split second into the timeline using a different shape/object as the trigger BUT it fails just the same. Please advise and thanks in advance!

14 Replies
Jason Johnson

I'm previewing locally BUT it works perfectly in HTML5 and the graphics do change state in the Flash version, just not the appropriate states. Also, it seems to work on the first slide in the set in Flash but not on subsequent slides (the triggers & JS are identical on each slide). It just seems like the graphics are not listening for the "adjust variable" trigger consistently.

Usually with JS previewing locally it's an all-or-none scenario. The JS is functioning correctly but Flash isn't firing/listening for the events consistently it seems.

Steve Flowers

The Flash player is sandboxed when playing locally unless you add it to the whitelist. Flash can't interact with JavaScript locally. It's a security thing. Publishing to CD defeats this restriction. It's still playing within a browser. 

The security settings manager page is all jacked up...


Steve Flowers

Yes, definitely. Since it works publishing to CD, the Flash player security block is most likely the problem. Publishing to CD is still employing the HTML / Flash publish. The CD runtime wrapper runs the HTML in a browser instance within a security safe space. This makes the browser run without security chained encumbrances. You could actually upload the CD publish to a Web server and point to the story.html file and it would run in a browser.

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