Hi,
I need to communicate from loaded swf to the container swf in AS 3.0. This is the code for document class of loaded swf followed by code for source swf document class. Please let me know how i can call the method xyz() from the external swf ???
package com.scottgmorgan {
import flash.display.Sprite;
public class ExternalMovie extends Sprite {
public function ExternalMovie():void {
//nothing in our constructor right now.
}
}
}
code for source movie
package com.scottgmorgan {
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
import flash.display.LoaderInfo;
import flash.display.Sprite;
public class SourceMovie extends Sprite {
public function SourceMovie():void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
loader.load(new URLRequest('ExternalMovie.swf'));
}
private function onLoadComplete(e:Event):void {
//nothing ight now.
}
public function xyz():void {
trace("Hello world");
}
}
}