Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

sentoplene

Members
  • Posts

    2
  • Joined

  • Last visited

sentoplene's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm using LoaderMax in conjunction with SWFLoaders... And it seems that everything works fine when given relative paths of the swf's. But when I receive absolute paths, I get weird problems... var context :LoaderContext = new LoaderContext(); context.checkPolicyFile = true; //context.securityDomain = SecurityDomain.currentDomain; context.applicationDomain = ApplicationDomain.currentDomain; // create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners var queue :LoaderMax = new LoaderMax({ name:"gamePhotosQueue", auditSize: false, defaultContext: context, onProgress: progressHandler, onComplete:completeHandler, onError: errorHandler }); for (var i : int = 0; i < l; i++) { queue.append(new SWFLoader(url, {name: id, noCache: false, autoPlay: false})); } Then when further in my code I want to access the swf it gives me: countryloader = LoaderMax.getLoader('country' + CountryVO(_vo.countries[i]).countrycode); trace('countryloader: ' + (countryloader)); // traces Object SWFLoader trace('countryloader.rawContent: ' + (countryloader.rawContent)); // traces Object CountryVideo country = countryloader.rawContent as CountryVideo; trace('country: ' + (country)); // traces NULL ??????? So that's weird... and I tried al kinds of contexts checkPolicyFile = false; applicationDomain = new ApplicationDomain() and the above with different settings... Any idea? So it loads it but eventually when I cast it to a local var, it won't let me... And this is only with absolute paths, with relative all works fine...
  2. Hi, I am loading in a few SWF's with a LoaderMax queue: // create a LoaderMax named "mainQueue" and set up onProgress, onComplete and onError listeners var queue :LoaderMax = new LoaderMax({ name:"gamePhotosQueue", auditSize: false, onProgress: gamePhotosProgressHandler, onComplete:gamePhotosCompleteHandler, onError: gamePhotosErrorHandler }); // append several loaders var l :int = gamePhotosVO.gamePhotos.length; for (var i : int = 0; i < l; i++) { var id :String = PhotoVO(gamePhotosVO.gamePhotos[i]).id; var url :String = PhotoVO(gamePhotosVO.gamePhotos[i]).url; queue.append(new SWFLoader(url, {name: id})); } // start loading queue.load(); Somewhat later I need the SWF's, so I do the following: var loader :SWFLoader = LoaderMax.getLoader(vo.id); var mc :MovieClip = loader.rawContent; trace('mc.numChildren: ' + (mc.numChildren)); This will output: 'mc.numChildren: 0' So mc exists but has no children? The swf's are really basic swf's with 3 container (bitmapContainer, hitareaContainer, exceptionContainer)... There is no code whatsoever in the swf's... what am I doing wrong?
×