What are the available events for javascript in storyline or How to create custom events in storyline for javascripts

Feb 16, 2017

Guys, 

I am looking of something like

Var myvar=player.getVar("myvariable");

myvaronStateChange()

{

// perform some action

}

 

does anyone have idea or worked on this kind of requirement. 

2 Replies
Dave Cox

Hi Nicky,

There is a fairly long list of Storyline functions that you can access, but I've really found that the two that are really useful are player.GetVar() and player.SetVar. These two allow you to get and set Storyline variables that you have created in the Storyline presentation.

If you want to perform an action when a Storyline variable changes, this is really easy to do with just a trigger. In the Trigger Wizard, just select the action you want to perform, (it can be pretty much anything, including javascript,) and in the "When:" selection, select "Variable Changes."

As far as what Storyline functions are available, here is the list. Have fun exploring them!

• player.tick()
• player.correctMedia()
• player.update()
• player.wait()
• player.showSlideID()
• player.showSlideIndex()
• player.showNextSlide()
• player.showPreviousSlide()
• player.setSlideIndex()
• player.hideInactiveSlides()
• player.currentSlide()
• player.currentZoom()
• player.elapsedTime()
• player.play()
• player.pause()
• player.pauseClips()
• player.block()
• player.unblock()
• player.restart()
• player.initLoadQueue()
• player.loadResourcesForNextSlide()
• player.loadResources()
• player.unloadResources()
• player.prepAudio()
• player.updateMediaMonitor()
• player.onLoadedData()
• player.reorient()
• player.maximize()
• player.revealPostInterstitial()
• player.showInterstitial()
• player.addDiagnosticButton()
• player.sniffParameters()
• player.setupStressTest()
• player.prepSlides()
• player.loadFonts()
• player.parseFrameData()
• player.loadFrame()
• player.loadUserScript()
• player.loadMasks()
• player.parseMaskData()
• player.load()
• player.tapPause()
• player.tapZoom()
• player.updateItemInfo()
• player.forceRepaint()
• player.initGlobals()
• player.restrictUnsupportedBrowsers()
• player.GetVar()
• player.SetVar()
• player.initIOS()
• player.parseStoryData()

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