Jump to content
Search Community

prestont

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by prestont

  1. Sorry for the delay confirming but this indeed seems to work perfectly. Thanks again for all the help.
  2. This looks perfect, thank you. This was actually my first thought for a solution but I wasn't sure it was going to work but I am very glad to hear it will. Will be implementing today so I will let you know how it goes. Thanks, Preston
  3. So I am loading a bunch of images (for a game). When the game starts it starts loading images say 4 at a time. Some are higher priority related to others but aren't actually queued until a little later in the load cycle. I can basically give every image a priority of 1 to 10 say (1 being highest) but can't know what order they will be queued in or even what exact will be queued until later (or even after a user action) I now want to setup LoaderMax so that when I get a new image (say priority 3) I can insert it such that any currently pending priority 1, 2 or 3 images load first but then this priority 3 image loads before any queued images of priority lower then 3. What is the best way to arrange my queue's to support this? If I have 10 sub queue's can I add to a early sub queue and will that one take priority? Thanks, Preston
  4. Yes, the problem was the fla had an external dependency. I guess the swfloader tried to find it but never timed out of the process for some reason when it couldn't. Removing the (unneeded) dependency resolved the issue. Thanks, Preston
  5. Well in trying to create a minimal app, I found the problem. Apparently it was getting stuck on what looks like a corrupt SWF. I have attached it in case you want to see the effect. Basically it got stuck somehow thinking it was still loading and blocking the queue.
  6. I am getting a strange case I can't debug successfully. This is in code I have used in previous projects successfully. I am loading various SWF resources for the game. A bunch of resources (SWF's) are downloaded using a LoaderMax. This load without problem. _gameLoader = new LoaderMax({onFail:errorHandler,maxConnections:6,auditSize:false}) public function requestGameSWF(rname:String,n:String):void { var swfl:SWFLoader = new SWFLoader(n,{name:rname,autoPlay:false,onFail:gameSwfErrorHandler,onComplete:gameSwfLoadComplete}); _gameLoader.append(swfl); _gameLoader.load(); } Then as the users takes actions, additional swf's are requested and loaded. However, these were not being downloaded. From what I can tell the _gameLoader is still in state 1 (LOADING) according to its internal state but should, if fact, be in READY state since nothing is actually in the queue after the first set of files are laoded. When load() is called, it basically does nothing because it appears to be LOADING. If I use the debugger to change the state to READY before load is called, it picks up and loads fine. Also, if I cause pause() then load() it will start working again. I ran with this code in a different project for months now without a problem and this class was copied over without changes so I can't figure out what is broken. The problem remains both accessing files locally and downloading over http. Thanks, Preston ps. For all that this is two posts in one day, I have been using Loader for months now without a problem
  7. Thanks for the explanation. All I meant by the extra class was my understanding is that unless I did dispose(true) the ContentDisplay object, which I wasn't using, stuck around which seems to account for about 15% of my active memory and that was why I was using true instead of calling it with false. I figured the call was safe since I had a reference to the class. In fact, it actually appears to work fine and the user doesn't see anything unless you have the debugged version of flash player installed so I guess I can go with it and see what happens. Thanks again, Preston
  8. I am getting the class already in line with: swfl.getClass(swfl.name) and storing that myself so I don't see why I would need another reference to it. I would rather not keep the extra object around unless it is necessary. As far as I know there is no way for one object to force GC on a pointer that is still referenced in flash. dispose(false) does seem to remove the error message but keeps more memory for something I will never access.
  9. So I am using SWF loader to download a large number of individual assets as needed. Since i reuse them a lot (in a game) , after load I simply read out the class and store it in my own lookup table. public function gameSwfLoadComplete(e:LoaderEvent):void { var swfl:SWFLoader = e.target as SWFLoader; ImageManager.instance.loadDone(swfl.name,swfl.getClass(swfl.name)); } I have been using this code for a few weeks but starting to see some performance issues. I realized i was leaving around the SWFLoader and DisplayObject so I added a third line to the above function: swfl.dispose(true) However, when I do that I suddenly start getting a lot of this following error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found. As far as I can tell, it does recover and the art is downloaded but I don't know why I am getting this and what might be happening. And to clarify, I create a new SWFLoader each time: var swfl:SWFLoader = new SWFLoader(n,{name:rname,autoPlay:false,onFail:gameSwfErrorHandler,onComplete:gameSwfLoadComplete}); _gameLoader.append(swfl); _gameLoader.load(); Thanks, Preston
×
×
  • Create New...