-
1. Re: AS2/AS3 HELP
Ned Murphy Jul 23, 2010 1:52 PM (in response to PrintingByDBE)I am offering this based solely on trying to interpret the error message... if you use addChild for the Loader after the loading is complete, try doing it before loading starts instead.
-
2. Re: AS2/AS3 HELP
PrintingByDBE Jul 23, 2010 2:01 PM (in response to Ned Murphy)Hey ned!
thanks for the fast reply!
here is the code im using
maybe you can clear that up for me alittle more!
import flash.net.URLRequest; import flash.display.Loader; import flash.events.Event; import flash.events.ProgressEvent; function startLoad() { var mLoader:Loader = new Loader(); var mRequest:URLRequest = new URLRequest('http://cache.reverbnation.com/widgets/swf/42/pro_widget.swf'); mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); mLoader.load(mRequest); } function onCompleteHandler(loadEvent:Event) { addChild(loadEvent.currentTarget.content); } function onProgressHandler(mProgress:ProgressEvent) { var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal; trace(percent); } startLoad();
-
3. Re: AS2/AS3 HELP
Ned Murphy Jul 23, 2010 2:11 PM (in response to PrintingByDBE)I am shooting in the dark, but it can't hurt for you to try... I believe it is objecting to you trying to move the AS1/AS2 file to some other realm of the display list in the following function...
function onCompleteHandler(loadEvent:Event) {
addChild(loadEvent.currentTarget.content);
}
So change that function to...
function onCompleteHandler(loadEvent:Event) {
addChild(loadEvent.currentTarget);
}
and see if it helps.
If that fails, then try commenting out that line of code in that function and just add the mLoader to the display list right after yoiu declare it...
var mLoader:Loader = new Loader();
addChild(mLoader);



