i have a problem with loading external AWD Viewer in parent swf file.
i used Intermediate_AWDViewer in Away3D examples
(didn’t change AWD Viewer. used it as is.)
and parent swf file has documented ‘as’ file.
running AWD Viewer only, it working well.
but when i load it in a parent swf file, it’s not working.
just keep showing this
———————————————————————————————————
TypeError: Error #1009: Cannot access a property or method of a null object reference.
———————————————————————————————————
i think parent file can’t access AWD Viewer’s classes.
please help me.
below is parent file’s code
———————————————————————————————————
package
{
import flash.display.MovieClip;
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
public class Flash3DViewer extends MovieClip
{
private var _request:URLRequest = new URLRequest(“AWDViewer.swf”);
private var _loader:Loader = new Loader()
public function Flash3DViewer()
{
init();
}
private function init():void
{
stop();
_loader.load(_request);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, initLoaded);
swfContainer.addChild(_loader);
}
private function initLoaded():void
{
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, initLoaded);
trace(“contents loaded”);
}
}
}
———————————————————————————————————