Playing with AS3 - An example MP3 player component
Tuesday 25 July 2006 @ 8:46 am
Filed under:

I have finally gotten around to playing with AS3, and I decided to pick the Sound object as one to play with. In the end, I ended up creating a simple music playback “component” that uses a whole number of AS3 features. I am including the example here along with the source. Enjoy! Note: error handling is not yet very robust, but it still shows numerous aspects of AS3 in use. Requires Flash Player 9.

Grrrr… WordPress is munging the object and embed tags. The example can be seen here for the moment.

Another update: Did I mention error handling is not quite robust yet? Seems to not be loading anything over the server, however feel free to download the zip file and play with it locally.

Update 3: Seems it was just a case sensitivity issue on the file name, it’s up and running now.

Update 4: I have a new example up that adds some constructor options to some of the classes, and also adds a simple frequency spectrum display. Take a look and grab the updated source if you wish.

— By Nathan Derksen     PermaLink

8 Responses to “Playing with AS3 - An example MP3 player component”

  1. unijimpe Says:

    “Grrrr… WordPress is munging the object and embed tags”

    Hello, my name is Jim and i have created plugin for WordPress
    that it allows to insert SWFs in your WodrPress Blog. This Plugin
    uses the SWFObject library. The use is very simple, this plugin
    simply encloses the Javascript and insert code for insert SWFObject.

    The form to insert SWF is:
    [swf] pathtofile.swf, width, height[/swf]

    You can see an explanation and example in: http://unijimpe.pandela.net/?p=18.

  2. Nathan Derksen Says:

    Awesome, thanks! I will check that out. I was initially trying to use SWFObject, but the script tag seemed to be getting munged by WordPress, too. This looks like it will fit the bill perfectly.

  3. Yogz Says:

    Thanks !!
    Now I understand AS3 thanks to you ;)
    ++

  4. WaltDe Says:

    Very good reading. Peace until next time.
    WaltDe

  5. mycho Says:

    this is exactly what i was looking for at the right time (educational as 3.0 example using music, and the wordpress flash plugin.

    much obliged.

  6. cris Says:

    what is the example mp3 code true html?

  7. Mark Says:

    Hi.
    Can you tell me why you do not save references to the elements in a Display Object?
    (eg. Progressbar). Instead you always lookup up elements by getChildByName().

    I don’t wanna say its not good to do so… i’m just curious. memory concerns?

  8. Nathan Derksen Says:

    Howdy, sorry missed your note. There is nothing wrong with doing that, I do it myself when I need to access something frequently. I just don’t like having too many handles hanging around.

Leave a Reply


Blog Categories

Browse by Date
July 2006
M T W T F S S
« Apr   Oct »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Monthly Archives

Bloggers Area

XML Feeds Option