aled's cyfle

Thursday 30 November 2006

Flash training...

Posted at 12:17 pm.

This week we've been learning to use Adobe Flash with Neil Jenkins. He's been teaching us all we'll need to know for our Flash industry brief.

While I've had previous experience with Flash, I hadn't used it for a long time, and this serves as a nice refresher course.

One thing I didn't know Flash had the ability to do was to simulate download speeds of a movie on different connection speeds - you can test from a fast T1 connection down to a retro 14kbps modem connection. It also has a feature called a Bandwidth profiler which gives you various handy statistics relating to the load times and status of the movie - I love this!

We have been working on a flash mp3 player that loads music in from a URL and plays it. I decided to extend it a little, and build the Cyfle AMP, or Camp for short. At the moment it uses hard-coded variables to display various information, but it could easily be modified to import an XML file and parse the data from there. It's far from perfect - it hasn't got a volume control (though I'm not sure how important that is - wouldn't users just use their speakers to control the volume?), and there is a bug with the slider bar.

When flash imports an MP3 file, it can't tell how long a song is - only how much it has loaded so far. This works great when you stream it, because you can (as I have) applied a loading bar to show how much has been preloaded. You can't code it so that a positional slider will accurately show you how much of the song has been played. My solution to this was to fade in such a slider once the file had finished loading, and this is where I ran into a bug. I can't quite work out what went wrong, but it isn't working (it appears when it shouldn't sometimes, it doesn't disappear when it should, etc.).

Anyway, here's my MP3 player:

...that is, if you have flash (and aren't looking at it from an rss aggregator)


If you're interested in the music, you can click on the links in the flash player to take you to the websites where I got them - they were free to download, so I can't see a problem in allowing them to be played in this player.

0 comments

Add a Comment