How can I send a variable on flash animation to Storyline ?

Apr 20, 2018

Hello. I am new of Storyline. 

I am struggling to find a way how to communicate flash and storyline 2

I found similar questions, but I am not able to use the code. 

https://community.articulate.com/discussions/articulate-storyline/storyline-and-swf-flash-communication

https://community.articulate.com/discussions/articulate-storyline/how-to-add-show-layer-trigger-inside-flash


What I want to implement is once the user clicks a button on the flash file, the story line slide change the next slide.

I am not familiar with Action script3 now.

Would you please help me to find a solution?

 Please explain me detail how it works

Thanks. 

 

3 Replies
Sunny Park

I put the script on flash 

import flash.external.ExternalInterface;

_button.addEventListener(MouseEvent.CLICK, buttonClickHandler);

function buttonClickHandler(event:MouseEvent):void{
//grab the current value from Storyline and increase it by one
var valueIn:int=ExternalInterface.call('GetPlayer().GetVar','goNextSlide');
valueIn++;
//send a new value to Storyline
ExternalInterface.call('GetPlayer().SetVar','goNextSlide',valueIn);
}

 

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