Saturday 6 February 2010

today, I have mostly been looking at flash

Hi,

I have spent most of today building an mp3 player, and hacking in a image library by extending the object Song and adding the images to the array which is initialized to hold the parts of the object. I had just started writing a blog to whinge about 'why won't my array work', when i discovered I was editing the wrong file version!

The reason for hacking this is two fold: an object such as:

class Song
{
public var earl:String;
public var artist:String;
public var track:String;
public var image:String;
public function Song(e:String, a:String, t:String, i:String)
{
earl = e;
artist = a;
track = t;
image = i;
}
}

Is really useful for holding lots of parts for an object type (class).

Also, by passing the data to the flash movie in an xml file, it is easy to edit the data, as an example:

This can be used for video as well as sounds.

I won't post the rest of the code, it is all hacked from a tutorial on a site mentioned by Paul at http://www.gotoandlearn.com/

Ru

No comments:

Post a Comment