<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>hydrotik &#124; flash development &#124; actionscript &#124; creative &#187; QueueLoader</title>
	<atom:link href="http://blog.hydrotik.com/category/queueloader/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hydrotik.com</link>
	<description>actionscript and creative playground of Donovan Adams</description>
	<lastBuildDate>Thu, 04 Feb 2010 16:34:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>QueueLoader is now on Github!</title>
		<link>http://blog.hydrotik.com/2009/11/25/queueloader-is-now-on-github/</link>
		<comments>http://blog.hydrotik.com/2009/11/25/queueloader-is-now-on-github/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:07:42 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=391</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://wiki.github.com/hydrotik/QueueLoader" target="_blank"<img src="/wp-content/logov3.png" alt="GitHub" /></a></p>
<p>Github is the social networking version of a version control system. The learning curve with Git can be a little tricky at first, but after installing and learning the basic commands you will be up and running. The beauty of Git lies in the way it collects and organizes changes and data. Merging from multiples sources is reliable and makes for more contributions. This will hopefully encourage more people to get involved with Open Source projects including QueueLoader! I will still be providing a standalone link either here on the site or on the deprecated Google Page, but for wiki usage and change info definitely go to Github.</p>
<p><a href="http://wiki.github.com/hydrotik/QueueLoader" target="_blank">QueueLoader on Github</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2009/11/25/queueloader-is-now-on-github/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QueueLoader 3.1.8</title>
		<link>http://blog.hydrotik.com/2009/11/23/queueloader-3-1-8/</link>
		<comments>http://blog.hydrotik.com/2009/11/23/queueloader-3-1-8/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 02:34:03 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=385</guid>
		<description><![CDATA[Having some problems with the vcs on Google, but the featured link is current. I'm in the process of moving QueueLoader over to github to ultimately make life easier. 3.1.8 addressed an issue with throwing an error when running the queue with no items in it as well as the QUEUE_COMPLETE event firing if you [...]]]></description>
			<content:encoded><![CDATA[<p>Having some problems with the vcs on Google, but the featured link is current. I'm in the process of moving QueueLoader over to github to ultimately make life easier. 3.1.8 addressed an issue with throwing an error when running the queue with no items in it as well as the QUEUE_COMPLETE event firing if you run a queue with all items generating errors and the queue's ignoreErrors argument set to true.</p>
<hr />
<a href="http://queueloader-as3.googlecode.com/files/QueueLoader_rev_3_1_8_src.zip">Download QueueLoader rev 3.1.8 Source Only</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2009/11/23/queueloader-3-1-8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QueueLoader 3.1.7</title>
		<link>http://blog.hydrotik.com/2009/10/06/queueloader-317/</link>
		<comments>http://blog.hydrotik.com/2009/10/06/queueloader-317/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 03:30:14 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=325</guid>
		<description><![CDATA[Announcing a long overdue update of QueueLoader last week. Fixes include finally addressing the error handling of a missing item that is first loaded. Also some optimization of the utility with interfaces.
Click here to download
The google group has been growing and hopefully it has been helpful. I set up an approval process for membership to [...]]]></description>
			<content:encoded><![CDATA[<p>Announcing a long overdue update of QueueLoader last week. Fixes include finally addressing the error handling of a missing item that is first loaded. Also some optimization of the utility with interfaces.<br />
<a href="http://code.google.com/p/queueloader-as3/downloads/list" target="_blank">Click here to download</a></p>
<p>The google group has been growing and hopefully it has been helpful. I set up an approval process for membership to reduce the amount of spam. I typically approve members within 12 hours.<br />
<a href="http://groups.google.com/group/queueloader-users" target="_blank">Click here to join</a></p>
<p>Any additional suggestions or issues are welcome. Also feel free to click on our sponsors!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2009/10/06/queueloader-317/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouWillKnowTheTruth.Com &#8211; The Final Cylon</title>
		<link>http://blog.hydrotik.com/2008/11/30/youwillknowthetruthcom-the-final-cylon/</link>
		<comments>http://blog.hydrotik.com/2008/11/30/youwillknowthetruthcom-the-final-cylon/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 16:57:57 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[QueueLoader]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=280</guid>
		<description><![CDATA[

I'm excited about the launch of www.youwillknowthetruth.com. Keep checking the site as clues will be released frequently leading up to the moment of truth!




]]></description>
			<content:encoded><![CDATA[<p>
<img src="/wp-content/logo_ywntt.jpg" alt="Who is the Final Cylon? You Will Know The Truth Revealed the Fifth Cylon" /></p>
<p>I'm excited about the launch of <a href="http://www.youwillknowthetruth.com" target="_blank">www.youwillknowthetruth.com</a>. Keep checking the site as clues will be released frequently leading up to the moment of truth!</p>
<p>
<img src="/wp-content/baby_112608.jpg" alt="Final 5th Cylon Clue" /></p>
<p></p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/11/30/youwillknowthetruthcom-the-final-cylon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>11 Must Have Flash Resources and 11 Must Have Utilities For 2009</title>
		<link>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/</link>
		<comments>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 00:44:21 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[QueueLoader]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=256</guid>
		<description><![CDATA[Here's my list of 11 shweet resources and utilities for Flash Developers for the upcoming year. Some of these will look familiar to you from 2008 and possibly even earlier, but their significance and continued development will see them into 2009 and beyond. With the release of CS4, expect to see upgrades and revitalization of [...]]]></description>
			<content:encoded><![CDATA[<p>Here's my list of 11 shweet resources and utilities for Flash Developers for the upcoming year. Some of these will look familiar to you from 2008 and possibly even earlier, but their significance and continued development will see them into 2009 and beyond. With the release of CS4, expect to see upgrades and revitalization of a number of projects as new features of the latest version of Flash are incorporated.</p>
<h4>Resources:</h4>
<p>
<strong>1. <a href="http://code.google.com/p/papervision3d/" target="_blank">Papervision 3D</a> + <a href="http://code.google.com/p/vectorvision/" target="_blank">VectorVision</a></strong><br />
Now that Papervision has taken hold of the Flash community, what next? I decided to add it to this list, as I believe 2009 to be the year of PV3D optimization and streamlining. With the new features of CS4, along with GPU processing being utilized for rendering outside of full-screen mode, the upcoming year will see those chugging experiments running smoother with significant FPS gains. In Flash 10, the Graphics.drawTriangles method gives us the ability to draw triangles using UV and UVW coordinates natively which will strip a lot of code out of the engine. This will help enable the team to squeeze every ounce of efficiency out of Papervision which is the key to Papervision evolving and making it a lasting tool. All that being said, expect to see more pushing of the envelope and more amazing experiments. Along with Papervision, I'm excited to see the evolution of Vectorvision, the vector based add-on to the Papervision library. Creating font class files that can then be used to create 3D display objects, gives us another color in the artists palette. I'm hoping to see more drawing capabilities added very soon.</p>
<p><strong>UPDATE</strong>: Vectorvision's Mark Barcinski is now a member of the Papervision team.   Vectorvision code will get folded into the library making things a bit more convenient with updates. Also Tim Knip has released a triangulation lib which makes it easy to convert a Vectorvision object to DisplayObject3D. This provides shading, texturing, and quadrant engine functionality. This will also lead the way for extrusion!</p>
<p><strong>2. <a href="http://www.ribbit.com/platform/" target="_blank">Ribbit</a></strong><br />
One of the coolest things to come out of 2008 is Ribbit. So cool, that I have also added it to my 2009 list. The creative possibilities with Ribbit are endless. Imagine plugging your Flash application into a phone jack. Keep an eye out for Ribbit's Killer App Contest which will generate a great deal of ideas. I see a significant increase in viral development using Ribbit in 2009, as well as incorporated into social networking, digital artistic pieces, and more.</p>
<p><strong>3. <a href="http://www.goasap.org/" target="_blank">Go</a> + <a href="http://code.google.com/p/goplayground/" target="_blank">HydroTween</a></strong><br />
This is 1 of 2 of my shameless plugs, but try and think of this in terms of the big picture. Forgetting Hydrotween, Go is more then a foundation for a Tweening engine. It's the pulse for anything that has a beginning, an end, or any level  of frequency. Go made a modest dent in the development community in 2008, but I feel the best is yet to come. I'm hopeful that physics, more creative Tweening utilities, and even more 3D control and deforming modifiers will find their way to goplayground in 2009.</p>
<p><strong>4. <a href="http://unity3d.com/" target="_blank">Unity3D</a></strong><br />
It's very easy to get set in your ways when dealing with a ubiquitous platform such as Flash. With an over 90% penetration rate, one silently cringes when thinking of integrating another web platform on top of the Flash environment. That all gets thrown out the window after experiencing the pure awesomeness of the Unity3D plug-in. Well, O.K. The concerns are still there, but this is definitely something to keep an eye out for. As communication between Unity and Flash flourishes, this wil become standard for more robust 3D games and applications. I wouldn't be surprised if we see some sort of relationship between Adobe and Unity.</p>
<p><strong>5. <a href="http://fdt.powerflasher.com/" target="_blank">F.D.T.</a></strong><br />
It's easy to become an evangelist for FDT. The Powerflasher team is doing a great job of listening to the Flash community effectively which is great because I am one of those people that is quick to point out its occasional hiccups. 3.1 Standalone was a  and the foundation for further updates. Soon we will see MXML support in early 2009 as well as the Obfuscator which the team is working on with Nicolas Cannasse (HaXe). FDT is looking to bridge the gap between the design process and the development process as well as enhance the management. With the work that is being done to provide MXML support, the FDT engine is no longer tied to a specific coding language. What this means is that special projects such as as UML functionality, or an FDT configuration specifically for designers, can be undertaken without modifying the core.</p>
<p><strong>6. <a href="http://www.adobe.com/" target="_blank">Adobe Flash CS4</a></strong><br />
Hard to go down the list without mentioning the recent release of Flash CS4. The addition of the new Vector class will help to speed iteration processes by providing strict/strong typing of an array. In many cases, casting an object's type in a parameter will speed complex calculations. Following that concept, by defining an array's type at the onset, the iteration focuses on accessing its contents instead of what it contains. You can find a good example of this at <a href="http://thebackbutton.com/blog/65/new-vector-actionscript-3s-typed-array/" target="_blank">Alex Bustin's Blog</a>. Also in recent news from Adobe, <a href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Alchemy</a> (which allows you to compile C and C++ code into AS using llvm-gcc) will open the doors for many Actionscript developers. For ultimate cool factor, look out for the NES emulator running ROMS ported to AS3! (<a href="http://llvm.org/devmtg/2008-08/" target="_blank">FlaCC</a> &#8211; at the bottom) Also <a href="http://labs.adobe.com/technologies/flashcatalyst/" target="_blank">Catalyst</a> (formerly known as Thermo), should hopefully make the relationship between designer and developer easier when it comes to wire-framing out concepts.</p>
<p><strong>7. <a href="http://osflash.org/red5" target="_blank">Red5</a></strong><br />
When it comes to a server solution for Flash deployment, there are pretty much two options. One is the Flash Media Server which starts at around $5000 and the other is the free and open source Red5. It features streaming of FLV and MP3, recording of client FLV streams, remoting, and shared objects just to name a few. An admin tool has been added in 0.6.3 as well as stream listeners. For 2009, the Red5 team is introducing Server-Side AS3. This will allow you to write code on the server without knowing Java extending the flexibility and accessibility of Red5 for developers. Whole applications can be developed on the server for things such as Social Networking, media manipulation, and so much more. Red5 is poised to hit the 1.0 version mark pretty soon which will help in making it even more competitive with Flash Media Server as stable platform.</p>
<p><strong>8. <a href="http://www.amfphp.org/" target="_blank">AMFPHP</a></strong><br />
This overlaps with Red5 a tad, but I added it because it is something that I find quick and easy to use on a per project basis. Fairly straightforward as it provides communication between a PHP server and Flash applications. Another standard addition to this is Danny Patterson's <a href="http://osflash.org/as3lrf" target="_blank">AS3 Lightweight Remoting Framework</a>.</p>
<p><strong>9. <a href="http://www.pranaframework.org" target="_blank">Spring Actionscript/Prana</a></strong><br />
Prana is an Inversion of Control container for AS3. This topic very easily requires its own post, but in simplest terms, Prana lets you configure your Application's components using an external XML file and initializing them at runtime. For large scale projects this is important as it lets you define your framework and allow for changes and management of dependent classes. The best place to get an overview of how this works is <a href="http://www.martinfowler.com/articles/injection.html" target="_blank">here</a>. You can also find an example of an <a href="http://sleepydesign.blogspot.com/2008/10/prana-hello-world-prana-minimalist.html" target="_blank">AS3 only version</a>. Because Prana uses a Spring complient XML structure, it's being made into a Spring Extension and being renamed "Spring Actionscript". Adding it to a family of other IoC frameworks on other platforms.</p>
<p><strong>10. <a href="http://code.google.com/p/popforge/" target="_blank">PopForge</a></strong><br />
Pop Forge has already gained a great deal of notoriety this year with Andre and Joa's exploit of the ByteArray hack. With the ability to write Byte level code directly to the Sound object in Flash 10, expect to see this library trimed down even further with more effects and added forms of sound manipulation. I'm looking forward to seeing signs of formant filtering as well as additive and spectral synthesis. How about routing L.F.O. control to other things like the Graphics class? Or better yet, routing graphical output to the envelope of a sound? Maybe some cross pollination of <a href="http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html" target="_blank">PixelBender with PopForge</a>? Which of course brings me to my next item in the list&#8230;</p>
<p><strong>11. <a href="http://labs.adobe.com/technologies/pixelbender/" target="_blank">Pixel Bender</a></strong><br />
Pixel Bender is Adobe's new kernal language used to manipulate pixels in new and creative ways. Pixel Bender runs on multiple Adobe products which opens up the ability to write uber-cool filters for static and motion graphics. Pixel Bender focuses heavily on the GPU to perform its tasks, making it much more efficient and capable of complex operations. Photoshop, Flash, and After Effects will all benefit from the experimental work being done with this tool and a number of innovative examples have already surfaced. <a href="http://www.subblue.com/projects/droste" target="_blank">Escher's Droste Effect</a> is one such effect that "spiralizes" a circular pattern and even works with a video source. Another is the ability to do <a href="http://mike.newgrounds.com/" target="_blank">Ray Tracing</a> and shading. I expect to see more of this trickle into Papervision and Bitmap processing libraries in the not so distant future.</p>
<h4>Utilities and Helpful Approaches:</h4>
<p>
<strong>1. <a href="http://code.google.com/p/swfobject/" target="_blank">SWFObject 2.0</a></strong><br />
The standard for embedding anything with a swf at the end of the file path. 2.2 development has been started with plans to address OnHold/ FixedIn2.2AlphaX. Expect a number of Flash 10 enhancements to come shortly for things such as express installer, wmode, etc.</p>
<p><strong>2. <a href="http://www.paultondeur.com/2008/11/12/unity3d-communication-with-browser-and-flash/" target="_blank">Unity Object</a></strong><br />
Awesome and useful example of how to communicate between a Unity3D app and Flash.</p>
<p><strong>3. <a href="http://code.google.com/p/queueloader-as3/" target="_blank">QueueLoader 3.1</a></strong><br />
My last shameless plug. I chose to add this because of the significant re-write of the utility and ease in which people can add their own extras. With the new structure in place, be on the lookout for more loadable items and useful preloading processes similar to the drawFrames (lets you draw the frames of an external SWF to an array of bitmaps) feature.</p>
<p><strong>4. <a href="http://rockonflash.wordpress.com/2008/10/01/how-to-detect-when-a-textarea-is-full-paging/" target="_blank">TextArea Paging</a></strong><br />
A great trick for detecting the overflow of a TextArea for spilling into another TextArea. Perfect for creating "news" style layouts and working around images.</p>
<p><strong>5. <a href="http://ntt.cc/2008/11/21/tutorials-about-using-flash-player-10-to-verify-the-files-type-filereference.html" target="_blank">FileReference Verification of File Type</a></strong><br />
Cool utility for detecting file types of uploaded assets using the FileReference class.</p>
<p><strong>6. <a href="http://dispatchevent.org/mims/version-checking/#more-446" target="_blank">Libary Code Version Checking</a></strong><br />
Cool technique for checking the version of your code when initializing. Helps to keep track of what version of a library you are using in a project to avoid conflicts.</p>
<p><strong>7. <a href="http://www.bigroom.co.uk/blog/object-pool-class" target="_blank">Object Pooling Class</a></strong><br />
Object Pooling is a technique for centralizing the management of instantiated objects. Having an object instantiated and ready for use can reduce bottlenecks and offers the ability to limit unique creation. This is perfect for particle engines as it's used above. If you've seen one of <a href="http://www.sebleedelisle.com/?p=187" target="_blank">Seb Lee-Delisle's</a> particle talks at a conference, then you've seen this in action with how he's recycling the particles.</p>
<p><strong>8. <a href="http://blog.mosessupposes.com/?p=47" target="_blank">SelectiveBitmapDraw</a></strong><br />
One other thing that gets Moses Gunesch really excited besides the mechanics of motion, is finding easy ways of compositing or capturing elements of a display hierarchy and manipulating them in fun ways. His SelectiveBitmapDraw Class lets you take a group of nested DisplayObjects and flag them for compositing into another Bitmap object. What makes this even cooler is that you can omit different items in the hierarchy. On top of that, you can use this with Papervision and apply it to DisplayObject3D items in your scene!</p>
<p><strong>9. <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit" target="_blank">FLARToolKit</a></strong><br />
This is one of those things you need to see with a <a href="http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/" target="_blank">video</a>. The FLARToolKit is used for creating "Augmented Reality" experiences. The way it works is by locking  onto visual targets as reference points for creating motion and mapping points. Also check out the post of <a href="http://www.mikkoh.com/blog/?p=129" target="_blank">Mikkoh Haapoja's</a>. A great video example can be found at <a href="http://www.todayandtomorrow.net/2008/09/01/desktop-fireworks/" target="_blank">today and tomorrow</a>.</p>
<p><strong>10. <a href="http://code.google.com/p/mrdoob/wiki/stats" target="_blank">HiReS! SWF Stats</a></strong><br />
Mr. Doob has a well done dashboard for continuously outputting a running swf's performance. We've all used the frames-per-second bar, memory output meter, ms time in troubleshooting our applications. What his utility also gives you, is a visual graph of the data in real-time in a nice complete package.</p>
<p><strong>11. Orchid</strong><br />
If you've heard of Saffron (Samuel Agesilas' Actionscript based UML utility for creating stub code in a graphical user interface), then you've heard of Orchid. Orchid is an open source UI framework that works using the concept of Signals and Slots. Saffron has long been shrouded in mystery and this is most likely the case due to the fact it was picked up by a well known software development company. Rumors that it was purchased by Microsoft popped up, then there have been ramblings of Adobe buying the code. Regardless of what the case is, having seen the interface work that Sam has done on Saffron, it's easy to get a sense of the capabilities and flexibility of the Orchid architecture.</p>
<p>In addition to the items above, there are a number of other interesting things worth mentioning. <a href="http://animoto.com/" target="_blank">Animoto</a> is a cool application that takes user submitted media, and creates a music video based on your settings and creative genius. <a href="http://aviary.com/" target="_blank">Aviary</a> is a group of software tools that let you edit images, generate color palettes, and visual effects. <a href="http://labs.blitzagency.com/?p=61" target="_blank">X-Ray</a> is a fairly well known and already established debugging utility that makes tracking trace statements, errors, and resources much easier. <a href="http://rockonflash.wordpress.com/2008/10/28/papervision3d-xray-introspection-finally/" target="_blank">John Grden</a> was able to make some changes for the Flex crowd recently and I'm looking forward to seeing how this progresses even further.</p>
<p>So that's the list! Because there is so much exciting stuff coming in the new year, I'm considering adding a user submitted list. What do you think? Contact me and let's get another list going!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>QueueLoader Version 3.1 &#8211; Major Update + Usage</title>
		<link>http://blog.hydrotik.com/2008/10/29/queueloader-rev-31-major-update-usage/</link>
		<comments>http://blog.hydrotik.com/2008/10/29/queueloader-rev-31-major-update-usage/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 01:14:35 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=143</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: 3.1.3:</strong> 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).</p>
<p><strong>UPDATE: 3.1.2:</strong> Changed path prop to URLRequest.</p>
<p><strong>UPDATE: 3.1.1:</strong> Fixed an error thrown in Flex 4 SDK in FLVItem.as &#8211; Also Added version numbers to all Files. <a href="http://code.google.com/p/queueloader-as3/" target="_blank">Update is on the SVN.</a></p>
<p><a name="top"></a>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:</p>
<p><img src="http://blog.hydrotik.com/wp-content/ql_logo.jpg" alt="QueueLoader Logo" /></p>
<p><strong>Source Downloads:</strong><br />
<a href="/wp-content/queueLoader_3-1-3.zip">QueueLoader 3.1.3 Example Files + Assets + Source + Documentation :: 28.44 MB</a><br />
<a href="/wp-content/queueLoader_3-1-3_src-docs.zip">QueueLoader 3.1.3 Source + Documentation :: 1.16 MB</a></p>
<p><strong>Note:</strong> 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.</p>
<p><strong>Also Note:</strong> 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.</p>
<p><strong>Mailing List:</strong><br />
<a href="http://groups.google.com/group/queueloader-users" target="_blank">QueueLoader Google Group</a></p>
<p><strong>General Features:</strong></p>
<ul>
<li><a href="#item">Individual item monitoring</a></li>
<li><a href="#overall">Overall queue monitoring</a></li>
<li><a href="#bandwidth">Bandwidth monitoring</a></li>
<li>Standard event based handling</li>
<li>Open source friendly structure</li>
<li><a href="#drawframes">Drawing of frames to an Array of BitmapData objects</a></li>
<li>Automatic detection of file types</li>
<li><a href="#mime">Manual specifying of file types</a></li>
<li><a href="#ignoreerrors">Skipping of failed loading items</a></li>
<li><a href="#domain">Application Domain access of loaded swf class references</a></li>
<li><a href="#dispose">Disposal of a queue's loaded items</a></li>
<li><a href="#qlmanager">Disposal of all queues added to the QLManager</a></li>
<li><a href="#onthefly">Adding items to the queue on the fly</a></li>
<li><a href="#xml">Access to a loaded item via getItemAt() or getItemByTitle()</a></li>
<li><a href="#sorting">Sorting of loading queue</a></li>
<li><a href="#resume">Stopping and resuming of a queue</a></li>
<li><a href="#smoothcache">Cache Killing</a></li>
<li><a href="#smoothcache">Bitmap Smoothing</a></li>
<li><a href="#mime">Passing URL Variables</a></li>
<li><a href="#loadxml">Passing XML data for setting up a QueueLoader using the loadXML(); method</a></li>
<li><a href="#timeline">Easy Access to SWF Timeline and Scope</a></li>
</ul>
<p><strong>Supported File Types:</strong></p>
<ul>
<li><a href="#item">Image loading &#8211; jpg/gif/png</a></li>
<li><a href="#drawframes">SWF loading</a></li>
<li><a href="#xml">XML loading</a></li>
<li><a href="#css">CSS loading</a></li>
<li><a href="#mp3">MP3 loading</a></li>
<li><a href="#wav">PCM WAV loading &#8211; Using Popforge Library</a></li>
<li><a href="#zip">ZIP loading &#8211; Using Nochump</a></li>
<li>FLV loading</li>
<li><a href="#wav">Generic loading &#8211; DAE/PHP/TXT/HTML</a></li>
</ul>
</ul>
<p><strong>QLManager &#8211; Global QueueLoader Management:</strong></p>
<ul>
<li><a href="#qlmanager">If I.D. is passed into QueueLoader Instance it is added to the QLManger for access</a></li>
<li><a href="#qlmanager">Global disposal of all QueueLoader's added to QLManager</a></li>
<li><a href="#qlmanager">Access to a Queue's targets</a></li>
</ul>
<p><strong>Useful Tips and Other Info:</strong></p>
<ul>
<li>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.</li>
<li>event.container &#8211; access to the container you specify in the addItem() method.</li>
<li>event.targ &#8211; 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.</li>
<li>event.content &#8211; 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&#8230;</li>
<li>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.</li>
<li>QueueLoaderLite has been included in the package and will undergo a rewrite soon as well making the distinction between the two clearer.</li>
</ul>
<p><a href="/wp-content/qldocumentation/html/index.html" target="_blank"><strong>View the Class Documentation Files</strong></a></p>
<hr />
<h3>Examples</h3>
<hr />
<p><strong><a name="overall">Overall Monitoring/Basic Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Most Basic Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_1&quot;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="item"><br />
Multiple Items and Event Monitoring Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Multiple Items and Event Monitoring Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> imageContainer:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>imageContainer<span style="color: #66cc66;">&#41;</span>;
imageContainer.<span style="color: #006600;">x</span> = imageContainer.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">25</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> startX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
<span style="color: #000000; font-weight: bold;">var</span> startY:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">3</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_&quot;</span>+i;
	img.<span style="color: #006600;">x</span> = startX;
	img.<span style="color: #006600;">y</span> = startY;
	img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .075;
	imageContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
	_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/&quot;</span>+<span style="color: #66cc66;">&#40;</span>i+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">&quot;.jpg&quot;</span>, img, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image &quot;</span>+i<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>startX <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">250</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		startX = startX + <span style="color: #cc66cc;">50</span>;
		startY = startY + <span style="color: #cc66cc;">100</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
		startX = startX + <span style="color: #cc66cc;">150</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_START</span>, onQueueStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_START</span>, onItemStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_PROGRESS</span>, onItemProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_ERROR</span>, onItemError,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Listener functions</span>
<span style="color: #000000; font-weight: bold;">function</span> onQueueStart<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemStart<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onItemProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemError<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&gt;&gt;&quot;</span>+event.<span style="color: #0066CC;">message</span>+<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="smoothcache"><br />
Bitmap Smoothing and Cache Killing Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Bitmap Smoothing and Cache Killing Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_1&quot;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = <span style="color: #cc66cc;">1.25</span>;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, img, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image 1&quot;</span>, cacheKiller:<span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #0066CC;">smoothing</span>:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="domain"><br />
Calling a SWF's Library Class References &#8211; Application Domain Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Calling a SWF's Library Class References - Application Domain Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> addedDefinitions:LoaderContext = <span style="color: #000000; font-weight: bold;">new</span> LoaderContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addedDefinitions.<span style="color: #006600;">applicationDomain</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, addedDefinitions, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #ff0000;">&quot;testQueue&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalsounds.swf&quot;</span>, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_START</span>, onQueueStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//Listener functions</span>
<span style="color: #000000; font-weight: bold;">function</span> onQueueStart<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> loop:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #66cc66;">&#40;</span>getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Loop1&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> soundChannel:SoundChannel = loop.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">999</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="dispose"><br />
Queue Disposing<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Queue Disposing</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_1&quot;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .1;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, img, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image 1&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	setTimeout<span style="color: #66cc66;">&#40;</span>callDipose, <span style="color: #cc66cc;">3000</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> callDipose<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	_oLoader.<span style="color: #006600;">dispose</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="mime"><br />
Manually Setting File Type/URL Variable Example<br />
</a></strong><br />
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.</p>
<p><strong>PHP:</strong><br />
<code lang="php"><br />
<?php echo '<?xml version="1.0" encoding="iso-8859-1"?><br />
<test<br />
	css="test.css"<br />
	><br />
	<!--<br />
	Fonts:</p>
<p>	--></p>
<p>	<config><br />
		<audio src="flashassets/swf/externalsounds.swf" /><br />
	</config></p>
<p>	<images><br />
		<img src="flashassets/images/slideshow/' . $user . '.jpg" /><br />
		<img src="flashassets/images/slideshow/2.jpg" /><br />
		<img src="flashassets/images/slideshow/3.jpg" /><br />
	</images></p>
<p></test>'; ?>
</pre>
<p><a href="#top">Back To Top</a></p>
<p><strong>Actionscript:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Manually Setting File Type/URL Variable Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_1&quot;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .1;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/data.php?id=1&amp;user=yourname&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>,
		<span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML PHP&quot;</span>, mimeType:QueueLoader.<span style="color: #006600;">FILE_XML</span><span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;XML PHP&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> output:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">targ</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">child</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;images&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">child</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;img&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #66cc66;">@</span>src;
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>XML Node: &quot;</span>+output+<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="drawframes"><br />
Drawing a SWF's Frames to BitmapData Array Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Drawing a SWF's Frames to BitmapData Array Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalimages.swf&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF Images&quot;</span>, drawFrames:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;SWF Images&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> startX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #000000; font-weight: bold;">var</span> startY:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">65</span>;
&nbsp;
		<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i<span style="color: #66cc66;">&lt;</span>event.<span style="color: #006600;">bmArray</span>.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> bm:Bitmap = <span style="color: #000000; font-weight: bold;">new</span> Bitmap<span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">bmArray</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #ff0000;">&quot;auto&quot;</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			bm.<span style="color: #006600;">x</span> = startX;
			bm.<span style="color: #006600;">y</span> = startY;
			bm.<span style="color: #006600;">scaleX</span> = bm.<span style="color: #006600;">scaleY</span> = .75;
			addChild<span style="color: #66cc66;">&#40;</span>bm<span style="color: #66cc66;">&#41;</span>;
			startX = startX + <span style="color: #cc66cc;">85</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="ignoreerrors"><br />
Ignoring of Errors/Error Handling Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Ignoring of Errors/Error Handling Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//&lt;- true arg sets ignore errors</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img2:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">120</span>;
img2.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img2.<span style="color: #006600;">scaleX</span> = img2.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img2<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img3:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img3.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">220</span>;
img3.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img3.<span style="color: #006600;">scaleX</span> = img3.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img3<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, img<span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/12.jpg&quot;</span>, img2<span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/3.jpg&quot;</span>, img3<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_ERROR</span>, onItemError,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemError<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&gt;&gt;&quot;</span>+event.<span style="color: #0066CC;">message</span>+<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="resume"><br />
Stop and Resume Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Stop and Resume Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//&lt;- true arg sets ignore errors</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> img2:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
img2.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">170</span>;
img2.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">20</span>;
img2.<span style="color: #006600;">scaleX</span> = img2.<span style="color: #006600;">scaleY</span> = .075;
addChild<span style="color: #66cc66;">&#40;</span>img2<span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, img, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image 1&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/2.jpg&quot;</span>, img2, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image 2&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;Image 1&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		_oLoader.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #808080; font-style: italic;">// Set a 4 second to pause and resume the load</span>
		setTimeout<span style="color: #66cc66;">&#40;</span>resumeLoad, <span style="color: #cc66cc;">4000</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> resumeLoad<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	_oLoader.<span style="color: #006600;">resume</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="bandwidth"><br />
Bandwidth Detection Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Bandwidth Detection Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> imageContainer:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>imageContainer<span style="color: #66cc66;">&#41;</span>;
imageContainer.<span style="color: #006600;">x</span> = imageContainer.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">25</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> addedDefinitions:LoaderContext = <span style="color: #000000; font-weight: bold;">new</span> LoaderContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addedDefinitions.<span style="color: #006600;">applicationDomain</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, addedDefinitions, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> startX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
<span style="color: #000000; font-weight: bold;">var</span> startY:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">3</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> img:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	img.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image_&quot;</span>+i;
	img.<span style="color: #006600;">x</span> = startX;
	img.<span style="color: #006600;">y</span> = startY;
	img.<span style="color: #006600;">scaleX</span> = img.<span style="color: #006600;">scaleY</span> = .075;
	imageContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
	_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/&quot;</span>+<span style="color: #66cc66;">&#40;</span>i+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">&quot;.jpg&quot;</span>, img, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Image &quot;</span>+i<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>startX <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">250</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		startX = startX + <span style="color: #cc66cc;">50</span>;
		startY = startY + <span style="color: #cc66cc;">100</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
		startX = startX + <span style="color: #cc66cc;">150</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #0066CC;">bandwidth</span>+<span style="color: #ff0000;">&quot;KB/s&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="css"><br />
CSS Example<br />
</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// CSS Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.css&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;CSS&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_CSS</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>CSS: &quot;</span>+event.<span style="color: #006600;">content</span>.<span style="color: #006600;">styleNames</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="xml">XML Loading/Get Item By Title Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// XML Loading/Get Item By Title Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_XML</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>XML: &quot;</span>+event.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>XML Node:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>+XMLList<span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getItemByTitle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">item</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="sorting">Sorting Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Sorting Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/mp3/GetDown.mp3&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;MP3&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalsounds.swf&quot;</span>, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/data.php?id=1&amp;user=yourname&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>,
     <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML PHP&quot;</span>, mimeType:QueueLoader.<span style="color: #006600;">FILE_XML</span><span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalimages.swf&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF Images&quot;</span>, drawFrames:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.css&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;CSS&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_START</span>, onQueueStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueStart<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getQueuedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;MP3&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #808080; font-style: italic;">// This takes an array of two items (second arg)</span>
                <span style="color: #808080; font-style: italic;">// from 4th position (1st arg) and inserts them</span>
                <span style="color: #808080; font-style: italic;">// into the 2nd position (3rd arg)</span>
		_oLoader.<span style="color: #006600;">shuffle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getLoadedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="onthefly">Adding Items On-The-Fly Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Adding Items On-The-Fly Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/mp3/GetDown.mp3&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;MP3&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalsounds.swf&quot;</span>, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_START</span>, onQueueStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueStart<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getQueuedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;SWF&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalimages.swf&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF Images&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.css&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;CSS&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getLoadedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="qlmanager">QLManager Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// QLManager Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QLManager</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #ff0000;">&quot;loader1&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/mp3/GetDown.mp3&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;MP3&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalsounds.swf&quot;</span>, <span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader2:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #ff0000;">&quot;loader2&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader2.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader2.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/externalimages.swf&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;SWF Images&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
_oLoader2.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.css&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;CSS&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader2.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueue2Complete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader2.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader.<span style="color: #006600;">getLoadedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueue2Complete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_oLoader2.<span style="color: #006600;">getLoadedItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	setTimeout<span style="color: #66cc66;">&#40;</span>callDipose, <span style="color: #cc66cc;">3000</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> callDipose<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;QLManager Accessing Items:&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+QLManager.<span style="color: #006600;">getQueue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;loader1&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getItemAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+QLManager.<span style="color: #006600;">getQueue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;loader2&quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getItemAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	QLManager.<span style="color: #006600;">disposeAll</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;QLManager Disposing:&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+QLManager.<span style="color: #006600;">getQueue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;loader1&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>+QLManager.<span style="color: #006600;">getQueue</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;loader2&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="zip">Zip Loading Example</a></strong><br />
Make sure you have the nochump package in your source folder.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// Zip Loading Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/zip/assets.zip&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_ZIP</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span><span style="color: #000099; font-weight: bold;">\t</span>ZIP Array: &quot;</span>+event.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="wav">PCM Wav Loading Example</a></strong><br />
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.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//PCM Wav Loading Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundChannel:SoundChannel = <span style="color: #000000; font-weight: bold;">new</span> SoundChannel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/pcm/loop1.wav&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;Loop1&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_WAV</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		soundChannel = event.<span style="color: #006600;">content</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">999</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="mp3">MP3 Loading Example</a></strong><br />
<a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?id=58325849&#038;s=143441" target="_blank"><img src="/wp-content/island.jpg" alt="Audio Sample" width="150" height="150" /></a><br />
Audio taken from <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?id=58325849&#038;s=143441" target="_blank">Islands of Chill</a>. This album is great!</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//MP3 Loading Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundChannel:SoundChannel = <span style="color: #000000; font-weight: bold;">new</span> SoundChannel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/mp3/GetDown.mp3&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;MP3&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_MP3</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		soundChannel = event.<span style="color: #006600;">content</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="loadxml">Direct QL Formatted XML Loading Example</a></strong><br />
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="".</p>
<p>XML:<br />
<code lang="xml"><br />
<queueloader prefix="../"><br />
		<item container="this" src="flashassets/swf/externalimages.swf"><br />
			<info></p>
<p>				<cacheKiller><![CDATA[true]]&gt;</cacheKiller><br />
				<drawFrames><![CDATA[true]]&gt;</drawFrames><br />
			</info><br />
		</item><br />
		<item container="imageContainer" src="flashassets/images/slideshow/1.jpg"><br />
			<info></p>
<p>				<cacheKiller><![CDATA[true]]&gt;</cacheKiller><br />
			</info><br />
		</item><br />
		<item container="null" src="flashassets/images/slideshow/2.jpg"><br />
			<info></p>
<p>				<cacheKiller><![CDATA[true]]&gt;</cacheKiller><br />
			</info><br />
		</item><br />
		<item container="null" src="flashassets/images/slideshow/3.jpg"><br />
			<info></p>
<p>				<cacheKiller><![CDATA[true]]&gt;</cacheKiller><br />
			</info><br />
		</item><br />
	</queueloader>
</pre>
<p><a href="#top">Back To Top</a></p>
<p>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.</p>
<p>Actionscript:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//Direct QL Formatted XML Loading Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/test.xml&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;XML&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		_oLoader.<span style="color: #006600;">loadXML</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="timeline">SWF Timeline Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//SWF Timeline Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/swf/timeline.swf&quot;</span>, <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	queueprog.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">150</span> <span style="color: #66cc66;">*</span> event.<span style="color: #006600;">queuepercentage</span>;
	queue_txt.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;QUEUE: &quot;</span>+<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;% COMPLETE&quot;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">fileType</span> == QueueLoader.<span style="color: #006600;">FILE_SWF</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		event.<span style="color: #006600;">content</span>.<span style="color: #006600;">fireFunction</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		event.<span style="color: #006600;">content</span>.<span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<p><strong><a name="html">Generic Data Loading Example</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//Generic Data Loading Example</span>
&nbsp;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoader</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">queueloader</span>.<span style="color: #006600;">QueueLoaderEvent</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> _oLoader:QueueLoader = <span style="color: #000000; font-weight: bold;">new</span> QueueLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../queueloader.html&quot;</span>, <span style="color: #000000; font-weight: bold;">null</span>, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;HTML&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
_oLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_oLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt;onQueueProgress: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">title</span> == <span style="color: #ff0000;">&quot;HTML&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">content</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href="#top">Back To Top</a></p>
<hr />
<strong>Source Downloads:</strong><br />
<a href="/wp-content/queueLoader_3-1-2.zip">QueueLoader 3.1.2 Example Files + Assets + Source + Documentation :: 28.44 MB</a><br />
<a href="/wp-content/queueLoader_3-1-2_src-docs.zip">QueueLoader 3.1.2 Source + Documentation :: 1.16 MB</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/10/29/queueloader-rev-31-major-update-usage/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>QueueLoader rev33</title>
		<link>http://blog.hydrotik.com/2008/07/09/queueloader-rev33/</link>
		<comments>http://blog.hydrotik.com/2008/07/09/queueloader-rev33/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 00:59:55 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=108</guid>
		<description><![CDATA[UPDATE Latest Update and Source!
Made some fixes and updates per the helpful people on Google code as well as Richard Willis and Romuald Quantin. Google code site have been updated as well.
Thanks guys!

]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong> <a href="http://blog.hydrotik.com/category/queueloader/">Latest Update and Source!</a></p>
<p>Made some fixes and updates per the helpful people on <a href="http://code.google.com/p/queueloader-as3/" target="_blank">Google code</a> as well as Richard Willis and Romuald Quantin. <a href="http://code.google.com/p/queueloader-as3/" target="_blank">Google code</a> site have been updated as well.</p>
<p>Thanks guys!</p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/07/09/queueloader-rev33/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>QueueLoaderLite</title>
		<link>http://blog.hydrotik.com/2008/03/11/queueloaderlite/</link>
		<comments>http://blog.hydrotik.com/2008/03/11/queueloaderlite/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 15:19:08 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2008/03/11/queueloaderlite/</guid>
		<description><![CDATA[QueueLoaderLite has been deprecated. Regular QueueLoader 3.1.7 and later can be made into a lite version by removing loadable items!
I've stripped down some of the heavier features for an alternate "lite" version for those wishing a bare bones QueueLoader with low file size. QueueLoader will continue to thrive and there are some enhancements to the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>QueueLoaderLite has been deprecated. Regular QueueLoader 3.1.7 and later can be made into a lite version by removing loadable items!</strong></p>
<p>I've stripped down some of the heavier features for an alternate "lite" version for those wishing a bare bones QueueLoader with low file size. QueueLoader will continue to thrive and there are some enhancements to the regular version that will be made shortly.</p>
<p>The lite version is focused exclusively on image and swf asset loading. Application Domain/Loader Context is still there so you can load other items within a swf and have access to its class references in the library. I will add another guide page on the Google page shortly. I'm including all the listening function in the example below just so you can see it in action, but any/all of them can be removed. More examples and documentation on this version to come, but in the meantime&#8230; Basic usage:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">QueueLoaderLite</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">QueueLoaderLiteEvent</span>;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> qlLoader:QueueLoaderLite = <span style="color: #000000; font-weight: bold;">new</span> QueueLoaderLite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> imageContainer:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>imageContainer<span style="color: #66cc66;">&#41;</span>;
imageContainer.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;image&quot;</span>;
&nbsp;
qlLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../flashassets/images/slideshow/1.jpg&quot;</span>, imageContainer, <span style="color: #66cc66;">&#123;</span>title:<span style="color: #ff0000;">&quot;image&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">QUEUE_START</span>, onQueueStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">ITEM_START</span>, onItemStart, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">ITEM_PROGRESS</span>, onItemProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">ITEM_COMPLETE</span>, onItemComplete, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">ITEM_ERROR</span>, onItemError, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">QUEUE_PROGRESS</span>, onQueueProgress, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
qlLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueStart<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemStart<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>, <span style="color: #ff0000;">&quot;item title: &quot;</span>+event.<span style="color: #006600;">title</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemProgress<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>+<span style="color: #ff0000;">&quot;: &quot;</span>+<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot; percentage: &quot;</span>+event.<span style="color: #006600;">percentage</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemComplete<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&gt;&gt; name: &quot;</span>+event.<span style="color: #006600;">title</span> + <span style="color: #ff0000;">&quot; event:&quot;</span> + event.<span style="color: #0066CC;">type</span>+<span style="color: #ff0000;">&quot; - &quot;</span>+<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;target: &quot;</span>+event.<span style="color: #006600;">targ</span>, <span style="color: #ff0000;">&quot;w: &quot;</span>+event.<span style="color: #0066CC;">width</span>, <span style="color: #ff0000;">&quot;h: &quot;</span>+event.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#93;</span>+<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onItemError<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&gt;&gt; name: &quot;</span>+event.<span style="color: #006600;">title</span> + <span style="color: #ff0000;">&quot; event:&quot;</span> + event<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueProgress<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&gt;&gt; &quot;</span>+event.<span style="color: #0066CC;">type</span>+<span style="color: #ff0000;">&quot;: &quot;</span>+<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot; queuepercentage: &quot;</span>+event.<span style="color: #006600;">queuepercentage</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event : QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span> + event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>And for instantiating library assets in an external swf library:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">QueueLoaderLite</span>;
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">QueueLoaderEventLite</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> addedDefinitions:LoaderContext = <span style="color: #000000; font-weight: bold;">new</span> LoaderContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addedDefinitions.<span style="color: #006600;">applicationDomain</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> qlLoader:QueueLoaderLite = <span style="color: #000000; font-weight: bold;">new</span> QueueLoaderLite<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, addedDefinitions<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundSWF = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
soundSWF.<span style="color: #0066CC;">name</span> = <span style="color: #ff0000;">&quot;externalSounds&quot;</span>;
addChild<span style="color: #66cc66;">&#40;</span>soundSWF<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> soundChannel:SoundChannel = <span style="color: #000000; font-weight: bold;">new</span> SoundChannel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
qlLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span>prefix<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;flashassets/swf/externalsounds.swf&quot;</span>, soundSWF<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>QueueLoaderLiteEvent.<span style="color: #006600;">QUEUE_COMPLETE</span>, onQueueComplete,<span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
qlLoader.<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> onQueueComplete<span style="color: #66cc66;">&#40;</span>event:QueueLoaderLiteEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** &quot;</span>+event.<span style="color: #0066CC;">type</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #000000; font-weight: bold;">var</span> Loop1Reference:<span style="color: #000000; font-weight: bold;">Class</span> = getDefinitionByName<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Loop1&quot;</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #000000; font-weight: bold;">Class</span>;
        <span style="color: #000000; font-weight: bold;">var</span> loop1:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> Loop1Reference<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        soundChannel = loop1.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<hr />
<a href='http://blog.hydrotik.com/wp-content/queueloaderlite_src.zip' title='QueueLoaderLite Source'>QueueLoaderLite Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/03/11/queueloaderlite/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>QueueLoader AS3 rev27</title>
		<link>http://blog.hydrotik.com/2007/12/13/queueloader-as3-rev27/</link>
		<comments>http://blog.hydrotik.com/2007/12/13/queueloader-as3-rev27/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 04:23:18 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/12/13/queueloader-as3-rev27/</guid>
		<description><![CDATA[UPDATES! Latest Update and Source!
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 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATES!</strong> <a href="http://blog.hydrotik.com/category/queueloader/">Latest Update and Source!</a></p>
<p>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. </p>
<p><strong>Updates:</strong><br />
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.</p>
<p>Also included is <a href="http://www.justgooddesign.com/blog//" target="_blank">Jesse Graupmann's</a> suggestion and implementation of prioritizing and bundling of sub loaders. Basically it let's you do this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">_qLoader.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;firstQueueLoaderQueueLoader&quot;</span>, _oLoader, <span style="color: #66cc66;">&#123;</span> mimeType:QueueLoader.<span style="color: #006600;">FILE_QUEUE</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/12/13/queueloader-as3-rev27/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>QueueLoader AS3 rev 18</title>
		<link>http://blog.hydrotik.com/2007/12/10/queueloader-as3-rev-18/</link>
		<comments>http://blog.hydrotik.com/2007/12/10/queueloader-as3-rev-18/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 20:05:45 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[QueueLoader]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/12/10/queueloader-as3-rev-18/</guid>
		<description><![CDATA[UPDATES Latest Update and Source!
Sorry for the version jump. When I added flv and supporting files the SVN jumped up a few numbers. Regardless I am going to stop posting examples directly here on the blog with the exception of updates and new features worth noting. I think it's also an easy way for people [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATES</strong> <a href="http://blog.hydrotik.com/category/queueloader/">Latest Update and Source!</a></p>
<p>Sorry for the version jump. When I added flv and supporting files the SVN jumped up a few numbers. Regardless I am going to stop posting examples directly here on the blog with the exception of updates and new features worth noting. I think it's also an easy way for people to communicate questions, comments, concerns, etc. As far as usage, downloads, etc., I think it will be easier for me to keep all the necessary info on the google project site then retroactively updating my previous posts. </p>
<p><strong>Important Updates</strong><br />
QUEUE_INIT and ITEM_INIT have been changed to reflect the internal structure. They are now QUEUE_COMPLETE and ITEM_COMPLETE. Sorry if this causes confusion but it needed to be changed at some point. <img src='http://blog.hydrotik.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>FLV support has been added finally. The event.file var in the callback will return a VideoPlayer Object for video control.</p>
<p>I did some other utilitarian and formatting tasks event meta info, debugging organization with parent level accessibility, etc.</p>
<p><a href="http://code.google.com/p/queueloader-as3/downloads/list" target="_blank">Click here for the current rev</a></p>
<p><a href="http://code.google.com/p/queueloader-as3/wiki/QueueLoaderGuide" target="_blank">Click here for the usage guide</a></p>
<p><a href="http://code.google.com/p/queueloader-as3/wiki/ChangeLog" target="_blank">Click here for the change log</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/12/10/queueloader-as3-rev-18/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
