Add

QueueLoader Version 3.1 – Major Update + Usage


UPDATE: 3.1.3: Fixed width and height prop in Image and SWF items. Added autoPlay to FLV. event.content returns the NetStream object and using event.content.seek(0) and event.content.togglePlay() will start the stream if the item is NOT set to autoPlay (false is the default).

UPDATE: 3.1.2: Changed path prop to URLRequest.

UPDATE: 3.1.1: Fixed an error thrown in Flex 4 SDK in FLVItem.as – Also Added version numbers to all Files. Update is on the SVN.

I'm excited to announce that QueueLoader has undergone a major revision. I finally had a chance to rewrite the class and make it more "Open Source" friendly and scalable. All loadable items have been broken out into separate classes implementing an ILoadable interface as well as extending an abstract loadable item. This will also make it easier for adding special features to loadable items, as well as promote the evolution of the package. The package path has been changed, but most of the API and general ease of use has remained the same. The most significant change is how to access loading items via the event callbacks. They have been broken out to container, targ, and content. They are explained further below in the "Useful Tips" section. I'm going to do my best to include as many frequently requested examples, but first let's go over the current features of this revision:

QueueLoader Logo

Source Downloads:
QueueLoader 3.1.3 Example Files + Assets + Source + Documentation :: 28.44 MB
QueueLoader 3.1.3 Source + Documentation :: 1.16 MB

Note: Both of the downloads above include the dependent libraries Popforge (.wav) and Nochump (.zip). I am not including these libraries on the SVN. Be sure to check for updates above to changes in the core QueueLoader source. If you wish to run QueueLoader without the additional libraries; In ItemList.as comment out line 45 and 46 where the zip and wav classes are being added to the loadable item list. Also comment out lines 82 and 84 in QueueLoader where the zip and wav filetype constant id numbers are defined. Finally be sure to remove ZIPItem.as and PCMSoundItem.as from the "items" package. If you wish to add your own custom item, you would simply follow the instructions in reverse but adding a unique number to the file type constant id.

Also Note: Just to clear up an possible confusion, this is a version change and not another revision. The URL to this page might be confusing as it looks like rev31 when it's 3.1.

Mailing List:
QueueLoader Google Group

General Features:

Supported File Types:

QLManager – Global QueueLoader Management:

Useful Tips and Other Info:

  • If you are loading a ton of images, you might consider putting them all on separate frames of a SWF and using the draw frames feature. If the image collection gets updated, putting them in a Zipped folder might be easier. This will alleviate the opening and closing of HTTP connections.
  • event.container – access to the container you specify in the addItem() method.
  • event.targ – access to the Loader of an Item in the case of an Image or SWF. This is what is added to the container DisplayObject if it has been added to the addItem() arguments.
  • event.content – access to the loaded item's data or content. In the case of an Image, it would be the Bitmap. In the case of a SWF, it would be the SWF's timeline. In the case of CSS, it would be the StyleSheet. In the case of audio, it would be the Sound. Etc…
  • Keep in mind QueueLoader is a utility, and not a component. Many of the more complex usage scenarios can very easily be built on top of QueueLoader. Using QueueLoader does require some basic knowledge of Actionscript 3.0, listeners, events, as well as scope. It's also much easier to extend the functionality if you are looking to modify the features of an existing loadable item. Simply replace a file type constant and add the Item to the ItemList with a regex for the filetype. Just make sure the file suffix doesn't conflict with another suffix.
  • QueueLoaderLite has been included in the package and will undergo a rewrite soon as well making the distinction between the two clearer.

View the Class Documentation Files


Examples


Overall Monitoring/Basic Example

// Most Basic Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
var img:Sprite = new Sprite();
img.name = "image_1";
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = .075;
addChild(img);
 
_oLoader.addItem("../flashassets/images/slideshow/1.jpg", img);
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Multiple Items and Event Monitoring Example

// Multiple Items and Event Monitoring Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var imageContainer:Sprite = new Sprite();
addChild(imageContainer);
imageContainer.x = imageContainer.y = 25;
 
var _oLoader:QueueLoader = new QueueLoader();
 
var startX:int = 0;
var startY:int = 0;
 
for (var i:int = 0; i < 3; i++) {
	var img:Sprite = new Sprite();
	img.name = "image_"+i;
	img.x = startX;
	img.y = startY;
	img.scaleX = img.scaleY = .075;
	imageContainer.addChild(img);
	_oLoader.addItem("../flashassets/images/slideshow/"+(i+1).toString()+".jpg", img, {title:"Image "+i});
	if (startX > 250) {
		startX = startX + 50;
		startY = startY + 100;
	} else {
		startX = startX + 150;
	}
}
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_START, onQueueStart, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_START, onItemStart, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_PROGRESS, onItemProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_ERROR, onItemError,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
//Listener functions
function onQueueStart(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}
 
function onItemStart(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
}
 
function onItemProgress(event:QueueLoaderEvent):void {
	trace("\t\t\t>>onItemProgress: "+event.queuepercentage);
}
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
}
 
function onItemError(event:QueueLoaderEvent):void {
	trace("\n>>"+event.message+"\n");
}
 
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Bitmap Smoothing and Cache Killing Example

// Bitmap Smoothing and Cache Killing Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
var img:Sprite = new Sprite();
img.name = "image_1";
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = 1.25;
addChild(img);
 
_oLoader.addItem("../flashassets/images/slideshow/1.jpg", img, {title:"Image 1", cacheKiller:true, smoothing:true});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Calling a SWF's Library Class References – Application Domain Example

// Calling a SWF's Library Class References - Application Domain Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
 
var addedDefinitions:LoaderContext = new LoaderContext();
addedDefinitions.applicationDomain = ApplicationDomain.currentDomain;
 
var _oLoader:QueueLoader = new QueueLoader(false, addedDefinitions, true, "testQueue");
 
_oLoader.addItem("../flashassets/swf/externalsounds.swf", this, {title:"SWF"});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_START, onQueueStart, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
//Listener functions
function onQueueStart(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	var loop:Sound = new (getDefinitionByName("Loop1"))();
	var soundChannel:SoundChannel = loop.play(0,999);
}

Back To Top


Queue Disposing

// Queue Disposing
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
var img:Sprite = new Sprite();
img.name = "image_1";
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = .1;
addChild(img);
 
_oLoader.addItem("../flashassets/images/slideshow/1.jpg", img, {title:"Image 1"});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	setTimeout(callDipose, 3000);
}
 
function callDipose():void{
	_oLoader.dispose();
}

Back To Top


Manually Setting File Type/URL Variable Example

This will let you pass URL variables to a file that is to be loaded. Keep in mind that the example data.php file has no php code in it so that it will run locally. However on a php server you would have the code shown below in the data.php file. This will pass the url variable $user a value of yourname, which you should see as yourname.jpg in the XML output.

PHP:


css="test.css"
>






'; ?>

Back To Top

Actionscript:

// Manually Setting File Type/URL Variable Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
var img:Sprite = new Sprite();
img.name = "image_1";
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = .1;
addChild(img);
 
_oLoader.addItem("../includes/admin/data.php?id=1&user=yourname", null,
		{title:"XML PHP", mimeType:QueueLoader.FILE_XML}
);
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "XML PHP") {
		var output:String = XML(event.targ).child("images").child("img")[0].@src;
		trace("\n\t\tXML Node: "+output+"\n\n");
	}
}
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Drawing a SWF's Frames to BitmapData Array Example

// Drawing a SWF's Frames to BitmapData Array Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/swf/externalimages.swf", null, {title:"SWF Images", drawFrames:true});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "SWF Images") {
		var startX:int = 0; var startY:int = 65;
 
		for (var i:int = 0; i<event.bmArray.length; i++) {
			var bm:Bitmap = new Bitmap(event.bmArray[i], "auto", true);
			bm.x = startX;
			bm.y = startY;
			bm.scaleX = bm.scaleY = .75;
			addChild(bm);
			startX = startX + 85;
		}
	}
}
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Ignoring of Errors/Error Handling Example

// Ignoring of Errors/Error Handling Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader(true); //<- true arg sets ignore errors
 
var img:Sprite = new Sprite();
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = .075;
addChild(img);
 
var img2:Sprite = new Sprite();
img2.x = 120;
img2.y = 20;
img2.scaleX = img2.scaleY = .075;
addChild(img2);
 
var img3:Sprite = new Sprite();
img3.x = 220;
img3.y = 20;
img3.scaleX = img3.scaleY = .075;
addChild(img3);
 
_oLoader.addItem("../flashassets/images/slideshow/1.jpg", img);
_oLoader.addItem("../flashassets/images/slideshow/12.jpg", img2);
_oLoader.addItem("../flashassets/images/slideshow/3.jpg", img3);
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_ERROR, onItemError,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemError(event:QueueLoaderEvent):void {
	trace("\n>>"+event.message+"\n");
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Stop and Resume Example

// Stop and Resume Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader(true); //<- true arg sets ignore errors
 
var img:Sprite = new Sprite();
img.x = 20;
img.y = 20;
img.scaleX = img.scaleY = .075;
addChild(img);
 
var img2:Sprite = new Sprite();
img2.x = 170;
img2.y = 20;
img2.scaleX = img2.scaleY = .075;
addChild(img2);
 
_oLoader.addItem("../flashassets/images/slideshow/1.jpg", img, {title:"Image 1"});
_oLoader.addItem("../flashassets/images/slideshow/2.jpg", img2, {title:"Image 2"});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "Image 1") {
		_oLoader.stop();
		// Set a 4 second to pause and resume the load
		setTimeout(resumeLoad, 4000);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}
 
function resumeLoad():void{
	_oLoader.resume();
}

Back To Top


Bandwidth Detection Example

// Bandwidth Detection Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var imageContainer:Sprite = new Sprite();
addChild(imageContainer);
imageContainer.x = imageContainer.y = 25;
 
var addedDefinitions:LoaderContext = new LoaderContext();
addedDefinitions.applicationDomain = ApplicationDomain.currentDomain;
var _oLoader:QueueLoader = new QueueLoader(false, addedDefinitions, true);
 
var startX:int = 0;
var startY:int = 0;
 
for (var i:int = 0; i < 3; i++) {
	var img:Sprite = new Sprite();
	img.name = "image_"+i;
	img.x = startX;
	img.y = startY;
	img.scaleX = img.scaleY = .075;
	imageContainer.addChild(img);
	_oLoader.addItem("../flashassets/images/slideshow/"+(i+1).toString()+".jpg", img, {title:"Image "+i});
	if (startX > 250) {
		startX = startX + 50;
		startY = startY + 100;
	} else {
		startX = startX + 150;
	}
}
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.bandwidth+"KB/s");
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


CSS Example

// CSS Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../includes/admin/test.css", null, {title:"CSS"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_CSS) {
		trace("\t\tCSS: "+event.content.styleNames);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

XML Loading/Get Item By Title Example

// XML Loading/Get Item By Title Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../includes/admin/test.xml", null, {title:"XML"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_XML) {
		trace("\t\tXML: "+event.content);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace("\n\nXML Node:\n"+XMLList(_oLoader.getItemByTitle("XML").content).queueloader.item[0]);
}

Back To Top

Sorting Example

// Sorting Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/mp3/GetDown.mp3", null, {title:"MP3"});
_oLoader.addItem("../flashassets/swf/externalsounds.swf", this, {title:"SWF"});
_oLoader.addItem("../includes/admin/test.xml", null, {title:"XML"});
_oLoader.addItem("../includes/admin/data.php?id=1&user=yourname", null,
     {title:"XML PHP", mimeType:QueueLoader.FILE_XML}
);
_oLoader.addItem("../flashassets/swf/externalimages.swf", null, {title:"SWF Images", drawFrames:true});
_oLoader.addItem("../includes/admin/test.css", null, {title:"CSS"});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_START, onQueueStart, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueStart(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader.getQueuedItems());
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "MP3") {
                // This takes an array of two items (second arg)
                // from 4th position (1st arg) and inserts them
                // into the 2nd position (3rd arg)
		_oLoader.shuffle(4, 2, 2);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader.getLoadedItems());
}

Back To Top

Adding Items On-The-Fly Example

// Adding Items On-The-Fly Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/mp3/GetDown.mp3", null, {title:"MP3"});
_oLoader.addItem("../flashassets/swf/externalsounds.swf", this, {title:"SWF"});
 
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_START, onQueueStart, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueStart(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader.getQueuedItems());
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "SWF") {
		_oLoader.addItem("../includes/admin/test.xml", null, {title:"XML"});
		_oLoader.addItem("../flashassets/swf/externalimages.swf", null, {title:"SWF Images"});
		_oLoader.addItem("../includes/admin/test.css", null, {title:"CSS"});
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader.getLoadedItems());
}

Back To Top

QLManager Example

// QLManager Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
import com.hydrotik.queueloader.QLManager;
 
var _oLoader:QueueLoader = new QueueLoader(false, null, true, "loader1");
 
_oLoader.addItem("../flashassets/mp3/GetDown.mp3", null, {title:"MP3"});
_oLoader.addItem("../flashassets/swf/externalsounds.swf", this, {title:"SWF"});
 
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
 
 
var _oLoader2:QueueLoader = new QueueLoader(false, null, true, "loader2");
 
_oLoader2.addItem("../includes/admin/test.xml", null, {title:"XML"});
_oLoader2.addItem("../flashassets/swf/externalimages.swf", null, {title:"SWF Images"});
_oLoader2.addItem("../includes/admin/test.css", null, {title:"CSS"});
 
_oLoader2.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueue2Complete,false, 0, true);
 
_oLoader2.execute();
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader.getLoadedItems());
}
 
function onQueue2Complete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
	trace(_oLoader2.getLoadedItems());
	setTimeout(callDipose, 3000);
}
 
function callDipose():void{
	trace("QLManager Accessing Items:");
	trace("\t"+QLManager.getQueue("loader1").getItemAt(0).title);
	trace("\t"+QLManager.getQueue("loader2").getItemAt(0).title);
	QLManager.disposeAll();
	trace("QLManager Disposing:");
	trace("\t"+QLManager.getQueue("loader1"));
	trace("\t"+QLManager.getQueue("loader2"));
}

Back To Top

Zip Loading Example
Make sure you have the nochump package in your source folder.

// Zip Loading Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/zip/assets.zip", null);
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_ZIP) {
		trace("\t\tZIP Array: "+event.content);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

PCM Wav Loading Example
Make sure the Popforge library is included in your source along with the modified SoundFactory class that bypasses the swf.bin file. This modified class writes the bytes to a ByteArray instead.

//PCM Wav Loading Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var soundChannel:SoundChannel = new SoundChannel();
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/pcm/loop1.wav", null, {title:"Loop1"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_WAV) {
		soundChannel = event.content.play(0,999);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

MP3 Loading Example
Audio Sample
Audio taken from Islands of Chill. This album is great!

//MP3 Loading Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var soundChannel:SoundChannel = new SoundChannel();
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/mp3/GetDown.mp3", null, {title:"MP3"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_MP3) {
		soundChannel = event.content.play(0);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

Direct QL Formatted XML Loading Example
This snippet of XML can reside anywhere in your XML document. It allows for automatic passing of QueueLoader data. The prefix attribute simply adds the prefix when the movie is in external/standalone mode when publishing locally. If your paths jump directories or require absolute paths, then you can leave it as prefix="".

XML:



















Back To Top

The loadXML() method also accepts a scope variable which relates to the container attribute. I.E. scope[container]. If it's null, then the container has no parent reference and is the same as adding null to an addItem() method.

Actionscript:

//Direct QL Formatted XML Loading Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../includes/admin/test.xml", null, {title:"XML"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "XML") {
		_oLoader.loadXML(event.content);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

SWF Timeline Example

//SWF Timeline Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../flashassets/swf/timeline.swf", this);
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	queueprog.width = 150 * event.queuepercentage;
	queue_txt.text = "QUEUE: "+Math.round((event.queuepercentage*100)).toString() + "% COMPLETE";
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.fileType == QueueLoader.FILE_SWF) {
		event.content.fireFunction();
		event.content.gotoAndPlay(2);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top

Generic Data Loading Example

//Generic Data Loading Example
 
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
 
var _oLoader:QueueLoader = new QueueLoader();
 
_oLoader.addItem("../queueloader.html", null, {title:"HTML"});
 
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
_oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete,false, 0, true);
 
_oLoader.execute();
 
function onQueueProgress(event:QueueLoaderEvent):void {
	trace("\t>>onQueueProgress: "+event.queuepercentage);
}
 
function onItemComplete(event:QueueLoaderEvent):void {
	trace("\t>> "+event.type, "item title: "+event.title);
	if (event.title == "HTML") {
		trace(event.content);
	}
}
 
function onQueueComplete(event:QueueLoaderEvent):void {
	trace("** "+event.type);
}

Back To Top


Source Downloads:
QueueLoader 3.1.2 Example Files + Assets + Source + Documentation :: 28.44 MB
QueueLoader 3.1.2 Source + Documentation :: 1.16 MB

The Discussion

see what everyone is saying

  • Justin Winter October 30th, 2008 at 1:10 am #1

    Nice work man! Did a brief review and I'm definitely excited to get my hands dirty. Definitely a fan of the zip support.

  • QueueLoader : flash und so… October 30th, 2008 at 7:01 am #2

    [...] QueueLoader gibts nun in einer neuen Version. Mehr Infos findet man dazu [...]

  • djdonovan October 30th, 2008 at 9:01 am #3

    Awesome let me know how it goes, and if there's anything you want to add:)

  • Bjorn Schultheiss October 30th, 2008 at 6:47 pm #4

    Super nice.

    2 examples that got my attention were "Drawing a SWF’s Frames to BitmapData Array" and "Queue Disposing".

    Is this latest revision making use of Flash 10?

    In my project I use FileReference a lot. Perhaps there's a case to integrate the FileReference.load() into QueueLoader.

  • djdonovan October 30th, 2008 at 7:38 pm #5

    Thanks Bjorn! Currently it is not, however I plan on doing a version for 10 soon. And FileReference.load() is on my list of items to add.

  • am November 4th, 2008 at 10:00 am #6

    hi Donovan,
    Great work you have here!

    One doubt, I was checking the demo and one thing that realise is that memory keeps rising as you make the queue start over. Don't know if this is normal, but once you dispose it should free memory no?

  • Krom November 4th, 2008 at 1:22 pm #7

    Thanks for the great updates to the utility. Question about the shuffle method, what is the best way for shuffling items to the top of the queue that have yet to load. For instance, a button is clicked for an asset to display, but that asset has not loaded yet. Can shuffle kill the current load and promote the needed asset to the top of the queue and execute it?

  • am November 4th, 2008 at 1:45 pm #8

    sorry, my mistake, after several presses in start, memory rises, click dispose and memory stays the same… but if click again in start the memory starts from normal (low) value.

    so disposal works great :)

    sorry the panic :P

    really great work the way you can acesses loaded objects (event.container/event.targ/event.content)

  • djdonovan November 4th, 2008 at 1:51 pm #9

    Just make sure you test his in the browser. unload() and therefore dispose() doesn't properly show the memory amount when you are testing within the Flash IDE.

    Thanks so much!

  • djdonovan November 4th, 2008 at 1:57 pm #10

    Yes, but you can't insert items in front of anything that is in the process of loading. If the stop() call comes within an itemComplete handler or before the itemComplete event is fired, then it will make the adjustment before the next item starts loading. Keep in mind shuffle() will not stop the current load, you would need to call stop() first then perform your shuffle duties.

    Hope that helps!

  • Krom November 4th, 2008 at 2:23 pm #11

    Thank you. To clarify, after stopping the queue prior to shuffling, would I need to shuffle the new items to the top of the queue or to the location where the queue is stopped before resuming? Again, many thanks.

  • djdonovan November 4th, 2008 at 2:32 pm #12

    The index is the index for the entire list of items. So if an item has loaded, the length of the list as well as the index position doesn't change. So if you've loaded one item and you want to shuffle 2 items to the next index you would insert them in position 1 (0 being the index for the first item) with a len of 2. And of course you would need to specify the index of where the 2 items are coming from. So you need an index for the source position, the length of the items, and an index of the destination position. That being said, to answer your question, You would need to insert them into the position of where the load has stopped. You couldn't insert them into index 0 as that has already completed. event.index will access the Queue's current index. So you could do something like queue.shuffle(sourceIndex, 2, event.index);

  • manheman November 4th, 2008 at 4:57 pm #13

    I try the queueloader.fla and i have an error :
    ///////////////////////////////////////////////
    TypeError: Error #1010: Un terme n'est pas défini et n'a pas de propriété.
    at queueloader_fla::MainTimeline/onItemComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.hydrotik.queueloader::QueueLoader/dispatchEvent()
    at com.hydrotik.queueloader::QueueLoader/completeHandler()
    at com.hydrotik.queueloader.items::XMLItem/preCompleteProcess()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    ** queueComplete
    ///////////////////////////////////////////////////////////
    Can somebody help me ?
    Thanks

  • djdonovan November 4th, 2008 at 5:05 pm #14

    Replace the onItemComplete handler with this code:

    function onItemComplete(event:QueueLoaderEvent):void {
    //trace("\t>> "+event.type, "item title: "+event.title);
    end_output.text = end_output.text + (event.index+1) + ": " + event.title + "\n";

    if (event.title == "MP3") {
    _oLoader.shuffle(6, 3, 1);
    }
    if (event.title == "XML PHP") {
    var dat:String = XML(event.content).child("images").child("img")[0].@src;
    php_data.text = dat;

    }
    if (event.fileType == QueueLoader.FILE_CSS) {
    trace("CSS: "+event.content.styleNames);
    }
    if (event.fileType == QueueLoader.FILE_MP3) {
    soundChannel = event.content.play(0,999);
    }

    if (event.title == "ZIP") {
    trace(event.content);
    }
    if (event.title == "SWF Images") {
    startX = 0;
    startY = 65;

    for (var i:int = 0; i var bm:Bitmap = new Bitmap(event.bmArray[i], "auto", true);
    bm.x = startX;
    bm.y = startY;
    bm.scaleX = bm.scaleY = .75;
    imageContainer.addChild(bm);
    startX = startX + 85;
    }
    }
    }

    I will update the download file. You can also refer to the example.fla as this is the same file that the examples in the post are using.

  • manheman November 4th, 2008 at 5:08 pm #15

    oK I WILL TEST IT.
    Can you tell how integrate it in a main class ? not using the timeline ?

  • manheman November 4th, 2008 at 5:14 pm #16

    I have an other question :
    I will used it to download files witch contain font.
    How can i access it ? (sorry for my bad english and bad actionscript …)

  • djdonovan November 4th, 2008 at 5:19 pm #17

    There is a sample Class file in the root src directory

  • djdonovan November 4th, 2008 at 5:20 pm #18

    add the font to an external swf, and call is using the application domain. Then access the font using its class reference.

  • manheman November 4th, 2008 at 5:24 pm #19

    Thanks a lot !!!

  • manheman November 4th, 2008 at 5:56 pm #20

    i'm sorry but i have a another question :
    I try the class :

    ///////////////////////////////////////////////
    package {
    import de.popforge.audio.processor.fl909.voices.Voice;
    import flash.display.Shape;
    import flash.system.Capabilities;
    import flash.text.TextField;
    import queueloader.QueueLoaderEvent;
    import queueloader.QueueLoader;
    import flash.events.EventDispatcher;
    import flash.system.ApplicationDomain;
    import flash.system.LoaderContext;
    import flash.display.Sprite;

    public class AssetLoader extends EventDispatcher {

    private var addedDefinitions : LoaderContext
    private var _oLoader : QueueLoader
    public function AssetLoader ():void {
    addedDefinitions = new LoaderContext(false, ApplicationDomain.currentDomain);
    _oLoader = new QueueLoader(false, addedDefinitions, true, "testQueue");
    _oLoader.addItem(prefix("") + "includes/admin/test.xml", null, {title:"XML", cacheKiller:true});
    _oLoader.addEventListener(QueueLoaderEvent.QUEUE_START, onQueueStart, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.ITEM_START, onItemStart, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.ITEM_PROGRESS, onItemProgress, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.ITEM_ERROR, onItemError, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.QUEUE_PROGRESS, onQueueProgress, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.QUEUE_COMPLETE, onQueueComplete, false, 0, true);
    _oLoader.addEventListener(QueueLoaderEvent.ITEM_HTTP_STATUS, onHTTPError, false, 0, true);
    _oLoader.execute();
    }

    private function onQueueStart(event : QueueLoaderEvent) : void {
    trace("** " + event.type);
    }

    private function onItemStart(event : QueueLoaderEvent) : void {
    trace("\t>> " + event.type, "item title: " + event.title);
    }

    private function onItemProgress(event : QueueLoaderEvent) : void {
    trace("LOADING " + event.title.toUpperCase() + ": " + Math.round((event.percentage * 100)).toString() + "% COMPLETE");
    }

    private function onQueueProgress(event : QueueLoaderEvent) : void {
    trace("QUEUE: " + Math.round((event.queuepercentage * 100)).toString() + "% COMPLETE");
    }

    private function onItemComplete(event : QueueLoaderEvent) : void {
    trace("\t>> " + event.type, "item title: " + event.title);
    }

    private function onItemError(event : QueueLoaderEvent) : void {
    trace("\n>>" + event.message + "\n");
    }

    private function onHTTPError(event : QueueLoaderEvent) : void {
    trace("\n\t\t>>"+event.message+"\n");
    }

    private function onQueueComplete(event : QueueLoaderEvent) : void {
    trace("** " + event.type);
    }

    private function prefix(serverPath : String) : String {
    var playerType : String = Capabilities.playerType;
    if (playerType == "External" || playerType == "StandAlone") {
    return "../";
    } else {
    return serverPath;
    }
    }

    }

    }
    /////////////////////////////////
    and il will great.
    Is it possible to create a class array with replace this lign
    _oLoader.addItem(prefix("") + "includes/admin/test.xml", null, {title:"XML", cacheKiller:true});
    My idea is to generate multiple addItem using a array and a external file (xml for exmample)

  • djdonovan November 4th, 2008 at 6:37 pm #21

    Yes, check the multiple loading example. Or you can try the loadXML() method and add you items to an XML file.

  • Satoshi November 7th, 2008 at 2:57 am #22

    Hi, Donovan

    It's my first time to comment on this blog and I think I've found a bug on QueueLoader.
    At QueueLoaderEvent, the data type of "path" is defined as String but I reckon it should be URLRequest as it passes the data fom AbstractItem's "path" which is defined as URLRequest.
    Otherwise it should be converted to String type during the event's constructor.

    I've amend it for myself but could you fix this at the next minour update?

    BTW, I truely appreciate both of QueueLoader and HydroTween.
    They are really helpful.

  • Marc November 7th, 2008 at 2:32 pm #23

    I'm wondering if I can change the height and width of the sprite where the imgs are being added? Example would be:

    imageContainer.height = swfStage.stageHeight

    When I try it nothing is displayed where if I delete the line the images load and appear in the movie.

    Help please.

  • djdonovan November 7th, 2008 at 4:38 pm #24

    Yes you can. Did you try using an absolute number? stage properties don't work as they should depending on the browser. Also try defining the container dimensions after the image has loaded.

  • djdonovan November 8th, 2008 at 1:43 pm #25

    SVN and Google have been updated with 3.1.2. Thanks for the catch!

  • Krom November 10th, 2008 at 6:46 pm #26

    When using a Video or VideoPlayer object as the container for FLV items, I am getting 'null' when I trace(event.content) in the onItemComplete event call back. Is there another way to trace the target that the FLV has loaded into?

    Thank you

  • djdonovan November 10th, 2008 at 9:29 pm #27

    Use event.container

  • alwayzambitious November 27th, 2008 at 10:33 am #28

    Hi,

    I copied and paste your code as is from the swf timeline example and I m geting alot syntax errors.

    Would you know whats going on..

  • djdonovan November 27th, 2008 at 10:44 am #29

    If you copied the code from the example into another file, there are sections of code you need to copy from the first frame.

    If you are experiencing errors in the example, it's probably because you have another example in another frame that is uncommented out.

    Feel free to send me your code as well.

  • alwayzambitious November 27th, 2008 at 10:46 am #30

    nevermind i got it.

    folks becareful when copying the code u made have to rewrite the " character.. becuse it comes in as curly quotes which are incorrect..

  • djdonovan November 27th, 2008 at 10:50 am #31

    Yeah that's an annoying thing about blogs. I'l have to see if I can switch the smart quotes char for the regular one in the wordpress plugin code.

  • djdonovan November 27th, 2008 at 11:07 am #32

    Found a plugin to untexturize the blog. Shouldn't be an issue anymore:)

  • djdonovan December 1st, 2008 at 12:52 am #33

    Updates have been posted.

  • ryan December 7th, 2008 at 3:46 pm #34

    thats ace! you just saved me a whole lot of time… keep on truckin…

  • Valeeum December 15th, 2008 at 8:38 pm #35

    i appreciate all the effort that's gone into this! i just had a quick question…

    is there a reason "index" has been left out of the QueueLoaderLiteEvent? Is there an equivalent variable in the lite version?

  • djdonovan December 15th, 2008 at 11:31 pm #36

    not really. Redoing QueueLoaderLite is on my list of things to do, but at this point I would suggest using the newer version of QueueLoader. QueueLoaderLite will be QueueLoader with some of its loadable items removed, which can be easily done with ItemList and removing the items you don't want. Beyond that I haven't drawn up plans for the lite version update.

  • per February 6th, 2009 at 6:23 am #37

    Hi Donovan
    thanks for the great work, I have used an earlier version of Queueloader for a previous project, and I am now looking forward to using this new version for my next project.
    I would like to utilize the ZIP feature, and have done some testing with it. I can load the ZIP (a file with lots of jpgs in it), but how do I extract the images to be used in flash?

  • djdonovan February 6th, 2009 at 11:27 am #38

    There should be a zip example in one the exmples fla. Also check out the nochump site as well for more advanced stuff.

  • William McBee February 6th, 2009 at 12:48 pm #39

    Greetings Donovan.

    Just wanted to say thanks for your work; was linked to it and compared it against BulkLoader and decided to use this – worked for me in just a few moments as I needed it to work.

  • djdonovan February 6th, 2009 at 1:08 pm #40

    Thanks William! Great to hear!

  • Daniel August 1st, 2009 at 6:58 pm #41

    Hey, just started using your loader class, fantastic work :) Just wanted to share 2 things with you (and any othes that might be interested) :

    1. In the main Queuloader class, you have a call to getMode() which returns false if you are using the Flash IDE. Not sure of the reasons for this, but to overcome issues with loading live data in tet mode, I added a test in the addItemAt function (line 209) :

    var urlReq:URLRequest = (info.ignoreMode) ? new URLRequest(src) : new URLRequest(strip[0] + ((getMode() && urlVars.length > 1) ? urlVars : ""));

    and I pass ignoreMode = true in the addItem info object.

    The second thing I found useful was to allow queueloader to handle loading of crossdomain policy files. I hacked up my version to handle this, but it might be something you'd consider ading to a future revision.

    Top stuff :)

    /dan

  • needle September 5th, 2009 at 1:26 pm #42

    Hi m8,

    i have a problem here when calling loadMC function(root) from nested mc(menu) all mc´s getting loaded to same target, first load works but then

    >> itemStart item title: null
    >> item target: [object Loader]
    >> itemProgress: percentage: 0
    >>onQueueBytesLoaded: 0
    >>onQueueBytesTotal: 51725
    [object SWFItem]
    >> itemProgress: percentage: 1
    >>onQueueBytesLoaded: 51725
    >>onQueueBytesTotal: 51725
    [object SWFItem]
    TypeError: Error #1006: value ist keine Funktion.
    at com.hydrotik.queueloader.items::SWFItem/preCompleteProcess()

    thx !

  • Peter_D September 29th, 2009 at 3:05 pm #43

    Hallo, i've loaded my swf to some target MC eq. targetMC

    LoaderSubPages.addItem("test.swf", targetMC, {title:"test"});

    In test.swf i've function some()
    How can i execute this function by CLICK on some others button?

    Thanks P

  • djdonovan September 29th, 2009 at 11:33 pm #44

    event.content.function();

    would access the timeline in an itemComplete handler.

  • Peter_D September 30th, 2009 at 3:04 am #45

    Yes yes, but how can i access to function in loaded content by clicking on some button, not by onComplete handler?

    Of course movieClip is loaded ;)
    I've tried to use a targetMc.content.testFunction("X")

    But it doesnt work. Undefined property

    testFunction is alredy in loaded movieClip

    Thanks again

    P

  • Peter November 1st, 2009 at 9:47 am #46

    Hi,

    i have a very strange problem with bigger files.
    I have six swf files in my loading queue. Each file is round about 7-8 MB. The loading queue class holds sometimes in the middle of item 1 to item 3 and doesn´t load anymore. Don´t know what to do know. Because when i get out the embedded video files everything runs fine.

    Maybe you can give me a hint what it can be?

    Thanks

    Peter

  • djdonovan November 1st, 2009 at 1:06 pm #47

    What version are you using? If it's anything after 3.1.3, I can't imagine what it would be unless it's an issue with the loader Class dealing with files over a certain size. If you have a place where I can take a look, or send the source, then I could make a better assessment of what it could be.

  • Peter November 1st, 2009 at 11:02 pm #48

    i use version 3.1.7, i finished know the loading logic and i think everythings runs fine now, but my problem is that my output window doesn´t show me all events. Sometimes it stopping to show me the progress, so that i thought i had a loading problem, but loading went fine. And when i shuffle the priority of my loaded movies the output window doesn´t show me all item start events. Maybe there is something wrong with cs4, i don´t know. Did you had some similar problems with bigger files? It´s the same with all fired events of QueueLoaderEvent. When you are interested, i can show you the files offlist.

  • Matt January 27th, 2010 at 5:58 pm #49

    Thank you for this… I think the only thing missing is clear documentation. To be fair, for those who are not so advanced ;)

    But for real, thanks…!

  • djdonovan January 27th, 2010 at 6:24 pm #50

    There are a lot of examples on the blog that cover most of the basic usage of the library. Also the download has a number of examples. Was there something in particular you are looking for? First time I've heard of missing clear documentation, so if you have suggestions, I'd love to hear them.

  • QueueLoader 3.1.8 CSS Example February 4th, 2010 at 12:29 pm #51

    [...] that I provide detailed guides for people and a website to promote QL. There are plenty of examples within this blog as well as a place on github to keep track of QueueLoader and (hopefully) promote [...]

Respond

get in on the action.

* Required

bottega veneta deep coffee pocket bag deep weight loss pills bingo and game casino gambling online virtual how to win at slots versace deep coffee venus bag women does viagra work online bingo uk discount drugstore where to get viagra or cialis diazepam cheap without rx bingo and slots does cialis really work bingo gaming chanel yellow shoulder bag bingo for cash slot machine buy meds online without presciption lancel pearl premier flirt prada white shoulder bag prescriptions pain killers without a prescription viagra product information cialis generic levitra viagra cialis male enhancement online gambling offers manolo blahnik beige hangisi valium indications anya hindmarch beige hobo how does diazepam work who has the cheapest cialis price for tramadol levitra website price for generic viagra top anti depressants pharmacy zolpidem marc jacobs antique gold keylock messenger bag pill for acne casino gambling buy carisoprodol cheap create poker website zyban tablet jimmy choo purple wells shoes valtrex medication counseling for erectile dysfunction hey bingo louis vuitton patent beige sandals louis vuitton monogram idylle pink tote power bingo slot games gucci black evening bag xanax fedex oral jelly viagra new casino slots discount erectile dysfunction medication christian louboutin white ambrosina pumps poker machine games buy no phentermine prescription high stakes poker buy tory burch golden reva ballerina flats casino locations roulette casinos play online casinos bingo and slots viagra effect on women louis vuitton damier graphite keepall bandouliere marc jacobs royal blue keylock shoulder bag play roulette online casino mania online buy compazine buy gucci black trainers online casinos en internet how to win slots christian louboutin blush barcelona sandals prescription diet drugs us only mobile casino games natural clomid buy overseas viagra online casino canada online xanax fedex norvasc generic erectile dysfunction products zoloft canada uk viagra supplier casino bonus tory burch deep blue tory logo rain boots poker for money prescription drugs online adipex no prescription needed pharmacies geniune cialis no prescription ambien dosing how do muscle relaxants work valentino beige snakeskin clutch what is tadalafil ativan dosages sales viagra ysl white muse bag cialis to buy online gambling strategy cheapest phentermine pills christian dior biege medium saddle handbag alprazolam brand cheap viagra new zealand low cost adipex bally patent patent red jana tote ambien pharmacy manolo blahnik bow booties what is viagra used for dosage viagra new diet pill fda approved play slots online now cialis best price las vegas bingo cialis generic tabs versace purple venita bow satchel chloe patent purple cyndi tote fendi apricot snake peekaboo handbag discount lipitor prescription ambien ambien 10mg poker us levitra free samples do meridia phentermine work the same order celine black shoulder bag louis vuitton patent black sandals over the counter medication cheap 37 5 phentermine safe effective diet pills loewe white handbag dolce gabbana black trainers buying phentermine alprazolam generic for xanax ativan 2mg prada beige fairy l bag generic cialis canadian diet phentermine viagra online cheap europe cialis platinum play bingo levitra info prescription drugs migraines levitra alternative phentermine ingredient how does cialis work louis vuitton damier azure canvas galliera gm order amoxicillin new arthritis and psoriasis drug lipitor online pharmacy professional blackjack how does cialis ultram ingredients