I would suggest adding an error listener to your loader. Then you can echo out the error message contained in the event.
Most likely, you are getting a 404 on the load. On Thu, Oct 21, 2010 at 5:56 PM, Laurence MacNeill <[email protected]> wrote: > Why am I getting the following error: "Error #2044: Unhandled IOErrorEvent:. > text=Error #2036: Load Never Completed." when given the following code in an > AIR 2.0 app: > > import mx.core.UIComponent; > > private var loader:Loader; > private var printSWF:MovieClip; > private var swfTimer:Timer; > > private function init(): void { > loadPrintingApp( "[my domain removed]", "QMS_test", "2010_iwcs"); > } > > public function loadPrintingApp(domainName:String, loginFolderName:String, > showFolderName:String): void { > var request:URLRequest = new URLRequest( "http://" + domainName + > "/" + loginFolderName + "/printing_" + showFolderName + ".swf"); > loader = new Loader(); > loader.load(request); > loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadIt); > var myUIComponent:UIComponent = new UIComponent(); > myUIComponent.addChild(loader); > addChild(myUIComponent); > } > > private function loadIt(event:Event): void { > swfTimer = new Timer(10); > swfTimer.addEventListener(TimerEvent.TIMER, swfCheck); > swfTimer.start(); > } > > private function swfCheck(event:TimerEvent): void { > printSWF = new MovieClip(); > printSWF = loader.content as MovieClip; > if (printSWF.application != null ) { > swfTimer.stop(); > printSWF.application.showName = "2010_iwcs"; > } > } > > In the code above, the init() function is run on the applicationComplete > event... > > The swf file that I'm trying to load is very simple, it contains only the > following: > > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml " minWidth=" 400" > minHeight=" 300" > > > <mx:Script> > <![CDATA[ > [ Bindable ] public var _showName:String; > > public function set showName(s:String): void { _showName = > s; } > ]]> > </mx:Script> > > <mx:Label x="10 " y="10 " text="Print Assist for {_showName } > loaded!" /> > > </mx:Application> > > > So basically, if this all loads correctly, I should have an AIR app that > shows a blank screen, except for the words "Print Assist for 2010_iwcs > loaded!". Simple enough -- yet it won't work... And I R Confused! :-) > > Thanks for any help you can give me. > > Laurence MacNeill > Mableton, Georgia, USA > ------------------------------------------------------------- > To unsubscribe from this list, simply email the list with unsubscribe in the > subject line > > For more info, see http://www.affug.com > Archive @ http://www.mail-archive.com/discussion%40affug.com/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- -- Scott Talsma CTO, echoEleven ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
