Groups | Blog | Home
all groups > flash (macromedia) > march 2004 >

flash (macromedia) : Sound/Music Help! =(


MrWCP
3/22/2004 11:33:19 PM
Hi all and ttya -

I thought what I was trying to do is very simple, but it is beating me down. I
am sure that I am just not doing something right. Anyhow this is the situation -

I have a list of buttons all coinciding to a song. Basically I just want the
user to be able to press one of the buttons and have that song play. If one is
already playing, have it stop when another is pressed.

Any and all information will be greatly appreciated!!

TYIA!! =)
MrWCP
3/23/2004 12:32:04 AM
MrWCP
3/23/2004 12:37:50 AM
I have found that I can use the getURL function, but that only queries to open or save the file.
MrWCP
3/23/2004 12:51:37 AM
Here is something else I have tried -

on (release) {
tears = "new Sound()";
tears.loadSound("d:/WCP/Blame/Sounds/DownTempo/TearsForThePast_8bit.mp3",
false);
tears.start();


In regards to the URL, I have actually tried linking to an mp3 on a domain and
that didn't work also. I have no idea what I am doing wrong. =(
GS
3/23/2004 1:31:04 AM
Put all your songs in the libary (CTRL-L) and right-click them,
give them all a different ID and use the code down here :

mysongbutt1.onPress = function()
{
stopAllSounds();
currentsong = new Sound(mymovie)
currentsong.attachSound("song1");
currentsong.start(0,0);
}

regards,
Gedeon


"MrWCP" <webforumsuser@macromedia.com> schrieb im Newsbeitrag
news:c3nt3v$lkk$1@forums.macromedia.com...
[quoted text, click to view]

MrWCP
3/23/2004 1:43:16 AM
Thanks! I will try that out now.

Just one last question - when you say give each song an ID, you mean just give
it a new name?
I have looked through all of the right-click options and I don't see anything
for a specific ID.

Thanks again!! =)
GS
3/23/2004 3:23:33 AM
oh, sorry ... I wasn't clear enough
Rightclick the soundfile in the libary and select "linkage",
select "export for actionscript" and "export in first frame" and
fill in the "identifier" or ID :)

In case you do want to load them dynamically ... you could use
streaming sound instead, like this

mybutton.onPress = function()
{
currentsong = new Sound();
currentsong.loadSound("mysong.mp3",true);
//"true" will make the sound play when there is enough data loaded.
}

"MrWCP" <webforumsuser@macromedia.com> schrieb im Newsbeitrag
news:c3o4nk$1ot$1@forums.macromedia.com...
[quoted text, click to view]

AddThis Social Bookmark Button