AssetLoader Updates – we have video!

As promised, I’ve updated the AssetLoader and pulled it into the 21st century. It is a lot more… flex-ible if you get what I mean (of course you do). Anyways, as a reminder, you can sync up with the following repository to get the code: http://assetloader.googlecode.com/svn/trunk

A word of warning: the new repository is now a home for all my code related to AssetLoader and that means it’s larger and more complex. What could be in there other than the value-added loading code you might ask? Well, I’ve got loader tests, which include examples to prove to myself that video, sound, images, and xml work (I assume images and xml work since it’s been working since the beginning) and I’ve got unit tests (with hamcrest and flex unit 4). Although the tests and the unit tests are not complete, I will be adding more as I get more experience using video in flash and more experience using flex unit.

A note about the video loading: Take a look at the video example in the AssetLoaderTests folder. You will notice that I have to save a reference to the netStream. In order to close out the AssetLoader and remove all references (clean up for garbage collection), I must null all variables created within the AssetLoader. Thus, if you try to add the video without storing a reference to the netStream, you will either see a blank screen or a frame of the video (however far it got until the netStream was deleted). So, keep a reference of the netStream for all videos you load and show (you can delete the references if you don’t need it of course) in order to get around this issue.

If you really only care about the source code, and I expect most of you to fall into that category, sync up with this repo: http://assetloader.googlecode.com/svn/trunk/AssetLoaderSource

It’s got everything you need to get up and running.

And finally, if you really just want the source to play around, you can download the SWC source from google repository: http://code.google.com/p/assetloader/source/browse/#svn/trunk/AssetLoaderSource/bin

or the zip file here: http://www.ayanray.com/downloads/assetloader_v1.3.8

Comments, feature requests, and feedback are always appreciated! I’m making this class available to help you! If it doesn’t do something that you think it should, hit me back.

Roadmap


1.5  -> Array Support

1.6 -> Perhaps I’ll do support for wave files and other embeddable but not loadable files (through ByteArray)

Related posts:

  1. AssetLoader has a new home As promised, I am going to fix up AssetLoader so...
  2. AS3 / Flash: Introducing the AssetLoader Class In Actionscript 3, there are many different ways to load...
  3. Self-Service: Subservient Video AS3 Flex 3 As my first self-service application, the Subservient Video AS3 application...
  4. Flash: Creating 1 FLV Video from many FLVs Creating a single FLV from many FLV’s can be either...
  5. Coming Soon – SWFWindow AS3 Framework They are a dime a dozen – a framework for...

About Ayan

Ayan Ray is a creative technologist living in the San Francisco Bay Area. He specializes in creating applications for Flash, PHP, Android, iPhone, and HTML5/CSS. He holds an undergraduate degree from Carleton University in Information Technology with distinction and numerous awards. This blog is all about his observations in technology, entrepreneurship, and his daily life. In his free time, he enjoys reading, staying fit by swimming, playing soccer and volleyball, and spending time with his friends and family.
This entry was posted in Flash and tagged , . Bookmark the permalink.

2 Responses to AssetLoader Updates – we have video!

  1. shalom says:

    Hi Ayan,

    How do i sync with your repository?
    when i try to connect it ask me for a username and password.

  2. Ayan says:

    Hey Shalom,

    Sorry, that was my mistake. In order to sync up with the repository, you need to sync up with http://assetloader.googlecode.com/svn/trunk/ and not the previous https://assetloader.googlecode.com/svn/trunk/

    You can also download from google code the 1.4 release.

    Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>