I have 2 swfs.
Swf A loads Swf B.
I want Swf A to listen to an event from Swf B.
So, in Swf A:
function myFunction():void{
//do stuff
}
addEventListener('doSomething', myFunction);
var container:MovieClip = new MovieClip();
stage.addChild(contentor);
//load Swf B and addChild him to container
Then, in Swf B:
dispatchEvent(new Event('doSomething',true,false));
I know I’m doing something wrong, probably something to do how I’m referencing the event. Help?