Hi:
I've a simple application with one movie loading another SWF in the same domain. I can access vars and functions in the loaded SWF but can't listen events from a button; receiving the run-time error: Error #1009: Cannot access a property or method of a null object reference
The Linkage properties for the button are set
Main
var assetLoader:Loader = new Loader();
assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadingComplete);
assetLoader.load(new URLRequest("home.swf");
function loadingComplete(evt:Event):void {
...
var asset:MovieClip = assetLoader.content as MovieClip;
asset.homeTrace("function in loaded SWF");
trace("var in loaded SWF:", asset.lastFrame);
// Error #1009
asset.enterApp.addEventListener(MouseEvent.CLICK, homeButtons);
...
}
Home
var lastFrame:Boolean = false;
function homeTrace(p1:String) {
trace(p1);
}
Thanks in advance