all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

MP3 Player Help


MP3 Player Help Detonate 2004
2/15/2006 7:37:17 PM
flash actionscript:
Guys, I need some help with an odd issue.

Most mp3 players tell what to play and where to get the songfiles inside the
movie itself.
Now I need to adapt a player that will pull a song from a html link into that
mp3 player on the page.

In other words, play a mp3 song in the player when html link is clicked.
How can we code the flash so it automaticaly plays the selected song form a
lower html list?


Re: MP3 Player Help Detonate 2004
2/17/2006 2:45:55 PM
blemmo, thanks for your help.
Actualy the asfunction is a nice alternative for any self contained flash apps.
I should have been a bit more precise in my top description. My flash movie is
on it's own and the html links on their own table inside the html page. Not as
one object...

It worked out passing parameters from html to flash.
Now I'm facing another issue. When the page loads, it automaticaly plays a
song inside the player. Even on refresh etc. Could someone point me out and
help to create a conditional statement.

So it doesn't start automatically but will if an html link is clicked

Here's my code so far:

var my_sound:Sound = new Sound();
my_sound.onLoad = function(success:Boolean) {
if (success) {
my_sound.start();
top.title.status_txt.text = _level0.titlename;
} else {
top.title.status_txt.text = "Sound Failed!";
my_sound.stop();
}
};
//grab the sound once lower html is clicked
my_sound.loadSound("someURL"+_root.file, true);
Re: MP3 Player Help Detonate 2004
2/17/2006 3:59:29 PM
might be easier to create a completely new function? listener?

this is leading nowhere so far...
I would like it to not automaticaly play a song, on refresh too etc.
How can I isolate and play once a link is clicked?
AddThis Social Bookmark Button