Jump to content
Search Community

firststephen

Members
  • Posts

    3
  • Joined

  • Last visited

firststephen's Achievements

0

Reputation

  1. Creating an empty LoaderMax then adding other ('parse' created) LoaderMax objects did exactly what I needed. Very nice. Thanks again.
  2. Hi Carl, thanks for your reply. I think that's what's happening. I'm getting more loaders from the 'getContent' call than I expect. All I'm trying to do is to load assets from different arrays (ie, from xml) using LoaderMax's ability to parse arrays (and to have a preloader 'see' all the assets). I'm using 'getContent' to create references to the assets so I can add them to the stage in another class (so I need 'getContents' to return just the loaders in one array. For example, 'thumbsArray = LoaderMax.getContent("thumbnails");' needs to be a reference to just an array of loaders for the thumbnails.) Clearly I'm not quite understanding how LoaderMax is supposed to work. I'll try making the main LoaderMax and adding the child LoaderMax's (created with 'parse') to it. If what I've said here makes it clearer, please don't hesitate to make other suggestions. Thanks again,
  3. Hi. I'm loading arrays of assets that may be a number of different types. I read in the documentation that you can append a LoaderMax. My interpretation of this is in this simplified code: var queue:LoaderMax; var loadermax_media:LoaderMax; //thumbsArray is an array of thumbnail jpgs. //mediaArray is an array of various types (jpgs, movies) LoaderMax.activate([ImageLoader, SWFLoader, VideoLoader]); queue = LoaderMax.parse(thumbsArray, { name: "thumbnails", maxConnections:1, onProgress:_progressHandler, onComplete:_queueCompleteHandler, onChildComplete:_childCompleteHandler} ) ; //The documentation says that 'parse'returns a LoaderMax object, so ... loadermax_media = LoaderMax.parse(mediaArray, { name: "ob1_media", maxConnections:1, } ) ; queue.append(loadermax_media); queue.load(); private function _queueCompleteHandler(e:LoaderEvent):void { thumbsArray = LoaderMax.getContent("thumbnails");//thumbsarray is ovewritten by loaded images mediaArray = LoaderMax.getContent("media");//mediaArray is overwritten by loaded assets } I'm getting content DisplayObjects in the final arrays, but too many in the thumbArray when I use 'append'. When I don't use 'append', it works fine. So is this the wrong approach?
×
×
  • Create New...