I have a swf embedded in another application (Articulate Storyline), and I am using ExternalInterface to retrieve values from this application like so:
stop();
import flash.external.ExternalInterface;
var myFlashVar:Number = ExternalInterface.call('GetPlayer().GetVar',"myStorylineVar");
if (myFlashVar == 1) {
play();
}
This all works fine, but I would like to know how I continuously listen to the value of "myStorylineVar" so that when it changes, I can perform my actions.
Thanks a lot!
Using ExternalInterface you can also call AS functions from JS code. I think it helps you. Some example:
Documentation.
So, in your case, when value in js changed you can just call some as3 function and perform actions that you need.