Try to trace out what's in assets[i].assetPath inside the loop and see what is returning. i also suggest to create the loader variable inside the loop.
for (var :uint = 0; i<assets.length; i+=) { var myLoader:Loader = new Loader(); trace(assets[i].assetPath); myLoader.load(new URLRequest(assets[i].assetPath)); } Cheerz On Mon, Apr 20, 2009 at 8:22 PM, Paul Andrews <p...@ipauland.com> wrote: > ----- Original Message ----- From: "Gregory Boland" < > breakfastcof...@gmail.com> > To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com> > Sent: Monday, April 20, 2009 4:36 PM > Subject: Re: [Flashcoders] AS3 Loader() stupidity > > > Paul, >> >> try to localize your error. Pull this code out and put it in a separate >> swf >> and see if that is still happening. I'm assuming that your assetLoader is >> a >> class variable. >> >> Doesn't look like anything from here is an issue. You don't have a custom >> Loader class that is interfering with the Loader keyword do you? >> > > Hi Gregory, no - no custom Loader class. > > Thanks for the suggestion. > > I also posted on flash_tiger (for some reason posts on falshcoders > sometimes take ages to appear). This is what I said: > > Thanks to everyone whose chipped in. > > I have a small example program that works perfectly, so somewhere in the > larger app there's something interfering. > > Unfortunately I have a lot of classes involved and it's all fairly involved > ( basically two or three XML feeds driving the construction of a website) > and a loader bar that doesn't know how much there is to load untill all the > assets have been identified from the XML. > > Thanks guys, more investigation to do. > > Paul > > > > > > > > > >> On Mon, Apr 20, 2009 at 9:58 AM, Paul Andrews <p...@ipauland.com> wrote: >> >> I have: >>> >>> assetLoader =new Loader(); >>> var urlreq:URLRequest = new URLRequest(assets[i].assetPath); >>> assetLoader.load(urlreq); >>> >>> >>> I get: >>> >>> TypeError: Error #1006: load is not a function. >>> >>> at runtime. >>> >>> I've seen some stuff about this to do with nested swfs, but can't quite >>> figure out the circumstances that may cause this error. >>> >>> Any ideas? >>> >>> Paul >>> _______________________________________________ >>> Flashcoders mailing list >>> Flashcoders@chattyfig.figleaf.com >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> _______________________________________________ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- Omar M. Fouad - Adobe Flashâ„¢ Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 Mail: m...@omar-fouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders