QueueLoader AS3 rev27
Turns out when I modify the wiki, the revision number jumps since the wiki is considered a commit. Makes sense since you can edit the wiki locally and upload to the server.
Updates:
Modified the FLV loading so it doesn’t use the Playback component source. It does simple streaming, event.file returns the NetStream Object. No more issues of having to link, import, or embed the component code.
Also included is Jesse Graupmann’s suggestion and implementation of prioritizing and bundling of sub loaders. Basically it let’s you do this:
Currently it requires setting the MIME type manually, but soon it will be set up so that if QueueLoader is in the path, it will recognize it as well. More enhancements and examples of this feature to come.
Click here for the current rev
December 13th, 2007 at 8:14 am
December 13th, 2007 at 1:40 pm
hello,
after update - I’ve got error like:
TypeError: Error #1006: attachNetStream is not a function.
at com.hydrotik.utils::QueueLoader/::loadNextItem()
at com.hydrotik.utils::QueueLoader/execute()
best regards
December 13th, 2007 at 1:55 pm
Make sure the target you pass when adding an FLV item is a Video object. Beyond that I’d need to see how you added the item and the rest of the code you used.
December 13th, 2007 at 2:30 pm
Thank you. It helps
I like this loader, but I need to preload all flv file, and on complete - play this video. Also, I need to read cue point. Can I do it now?
December 13th, 2007 at 2:45 pm
In the previous rev I tried to set up the loader so it would load an FLV then play by returning a VideoPlayer object. People were having problems as you need to either have the component embedded in the swf, link your classpath to the video classes, or copy the classes to the src folder. I’m looking into a way around this. In the meantime you could try using the rev18 version, but you’ll be on your own as far as importing your component video classes. I’d suggest adding the component to the stage.
December 19th, 2007 at 5:00 am
I would like to use queloader for a photo gallery I’m working on. Is there a way to move a specific que-ed item to the top of the list? Also would it possible to pause the currently loading item so that the user wouldn’t have to wait for it to finish before it started loading the requested item?
So when the gallery loads, 10 items could be added to the que. If the user selects item 7 while the que is loading 3 of 10, item 3 would stop loading, 7 would be moved to the top and start loading. After 7 has finished, if no other requests have been made, item 3 would resume loading.
Thanks!
December 19th, 2007 at 10:06 am
There are two functions that can be used for sorting, one of which is still in development. I haven’t tested sorting on the fly though. The stop() function will cancel a load. I think Justin would need to elaborate on this as he is working on the sorting functions. The gallery I’ve done in the past enables the item once it’s loaded, although with a large gallery it might be good to stop the load and create a new QueueLoader from the remaining items in the meantime. This is a useful idea and I will add it to the roadmap.
December 21st, 2007 at 6:24 am
[...] in a streamlined form, so the perfomance for asset-overheaded applications. Next time i give Donovan Adams QueueLoader a [...]
December 23rd, 2007 at 4:17 am
What about an auto smoothing setting?
in completeHandler:
if(_currType == FILE_IMAGE && imageSmoothing ) _currFile [ "smoothing" ] = true;
December 27th, 2007 at 10:20 pm
thank you this loader.
i want use Bitmap. not addchild sprite.
_oLoader.addItem(”a.jpg”, null, {title:”Image”+f});
this code error. changed QueueLoader.as file 586 line
case FILE_IMAGE:
if (currItem.targ == undefined && currItem.targ != null) {
dispatchEvent(…);
} else {
_loader = new Loader();
configureListeners(_loader.contentLoaderInfo);
_loader.load(request, _loaderContext);
if (currItem.targ != null) {
currItem.targ.addChild(_loader);
}
}
break;
December 28th, 2007 at 12:21 pm
Not sure why you posted the QueueLoader code. You would use
in the itemComplete callback
January 17th, 2008 at 4:26 am
hi man, how did you make the doc html? it’s so close to the doc in java.. there i a way to generate it automactly in flash?
January 18th, 2008 at 7:35 pm
The arguments are in the wrong order @
rev29 > QueueLoader > ioErrorHandler > on the line dispatchEvent(new QueueLoaderEvent( …
_bmArray & currItem.info.dataObj just need to be reversed.
Happy New Year!
January 19th, 2008 at 12:16 pm
All set!
January 21st, 2008 at 8:37 am
Hi,
It seems that QueueLoader load SWF Files into the currentDomain and there is no way to load it into another or new ApplicationDomains.
Is it possible, to load swf Files into different Application-Domains?
Thanks in advance
January 24th, 2008 at 6:50 am
What do you say we add some .json goodness to this biznatch?!
>> loadNextItem() NO TYPE DETECTED!
I managed to use FILE_CSS in order to get the right loaders, but I still had to add a line to QueueLoader to recognize the extension.
if(currItem.url.match(”.json”) != null) _currType = FILE_CSS;
While I’m not sure having to go as far as http://www.flash-db.com/Tutorials/loadingAS3/loadingData.php?page=1 to get URL-encoded data is needed, I think that raw text is an obvious oversight here.
Maybe instead of judging file-types like Corey Delaney’s sunnies, we could have a default straight up load… just a thought.
Keep rockn’ it like your parents are out of town!
J|G
January 25th, 2008 at 10:38 pm
There should be an example of how to use the application domain on the wiki.
January 25th, 2008 at 10:39 pm
Sounds good. send on over!
January 31st, 2008 at 8:52 pm
In QueueLoader > addItemAt
What purpose does the conditional serve for:
if(isLoading && !isStarted && !isStopped) _max++;
Cause if you add an item during the load process, the max never gets updated and you run the risk of queue percentages greater than 100%, which should never happen… right?
What kind of impact would you have if you changed it to:
_max++
February 8th, 2008 at 11:32 am
Hi
Can’t make it working!
I use flashdevelop + queueloader-as3-rev27
I import queueLoader classe in my Main class wich extends sprite and wrote this code :
var _oLoader:QueueLoader = new QueueLoader();
var _xml:XML;
_oLoader.addItem(”http://localhost/slideshow/banner01.xml”, null, {title:”XML”, mimeType:QueueLoader.FILE_XML});
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.execute();
Then I get this error :
D:\workspace_flashdevelop\as3_classes\classes\com\hydrotik\utils\QueueLoaderEvent.as(86): col: 143 Error: Initialiseur de paramètre inconnu, ou ce n’est pas une constante de compilation.
The problem is with “int = QueueLoader.FILE_IMAGE” param in QueueLoaderEvent.as(86)
Error reporting said that it’s an unknown init param or a compilation constant …
Any Issue?
February 8th, 2008 at 1:55 pm
I don’t see your complete event callback. Basic examples can be found at the link below, including loading XML.
http://code.google.com/p/queueloader-as3/wiki/QueueLoaderGuide
February 8th, 2008 at 2:01 pm
hi donovan
I’ve checked examples, and even with event callback I just get the same error, trying to load bmp or xml…
February 14th, 2008 at 1:21 pm
Hi Donovan,
Related to queue loader, I don’t know if you heard about this project:
http://code.google.com/p/masapi/
It is at a very advanced stage and I use it without any problem in commercial projects for months now.
I’m sure it can be interesting for you and for the QueueLoader users.
Best regards.
maddec
February 14th, 2008 at 1:36 pm
Looks good man!
Been on my list for a while, saved me the trouble:)