I have a weird issue with importing external SWF in ActionScript 3.0.
I want to import a SWF made with EasyPano TourWeaver 7.96 but when I'm doing this I'm getting the Error #2007: Parameter child must be non-null.
Here is the code:
var VRArea:MovieClip = new MovieClip();
VRArea.x = 0;
VRArea.y = 96;
addChild(VRArea);
var my_Loader:Loader = new Loader();
var urlRequest : URLRequest = new URLRequest("vr/vr_Candela.swf");
my_Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
my_Loader.load(urlRequest);
function loaderComplete(event:Event):void {
VRArea.addChild(my_Loader);
}
The complete error is shown below:
TypeError: Error #2007: Il valore del parametro type deve essere diverso da null.
at flash.events::EventDispatcher/addEventListener()
at `[::-V/5?()
at ->::4J/Step4_2_startUI()
at ->::4J/`Z()
at [A::&=/1?()
at [A::%c/dispatch()
at !A::%D/load()
at ->::4J/Step3_1_LoadConfig()
at ->::4J/Step3()
at ->::4J/Step2_createContext3D()
at ->::4J/%$()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at $::TWLoadingWindow/+&()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at 0M::1X/;$()
at 0M::1X/3@()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at 0M::>5/&S()
Additional info: I'm getting only the loading screen of the external SWF.