Making the values pass from AS3-SWF to Storyline

 

To communicate the information from an AS3-SWF to Storyline, follow the steps given below:

  1. Create a global variable in the AS3 file, that will contain the value that needs to be passed on to SWF. In this case the variable is score.
  2. Create a variable in Storyline that will be used to capture the values from SWF. In this case the variable is ‘gameScore’
  3. In the SWF file, place a trigger –

    import flash.external.ExternalInterface;
    ExternalInterface.call(‘GetPlayer().SetVar’,’gameScore’,score);

  4. Now import the SWF to the Storyline and you are done.

 

Thanks to Steve Gannon

Source:
https://elearningenhanced.com/blog/2012/05/24/setget-articulate-storyline-variables-within-your-as3-flash-file

Leave a Comment

Your email address will not be published.

Top