-
Repeating an action using a button
Hey
I'm trying to get make a combo box music selector, and when they hit the play button, the music plays. Right now I can get it to play when they select their first song, however I want to set it to where it will play more than one song, if the user wants to. For some reason you can only hit the play button once, and when you hit it the second time, nothing happens. The code I have for it is:
on (press) {
musicbox = musicbox.getSelectedItem().data;
if (musicbox == "heretostay.mp3") {
heretostay.loadSound("heretostay.mp3", true);
}
if (musicbox == "clickclickboom.mp3") {
clickclickboom.loadSound("clickclickboom.mp3", true);
}
}
I need to figure out how to set the play button to be clickable more than once, so the user can listen to multiple songs, instead of having to reload the entire movie just to play a different song then their first choice.
Thanks
Kyle
-
-
That didn't help out all
I have it so that it will load the respected files, but i just need it to repeat that action each time the button is pressed.
-
-
EXACTLY!!!!!!
i've got it set with the above code so that it will pick and play the song i want. but it will only do it once. do i need a loop or something?
site is at www.specialmaneuversteam.com/SMT.html
music stuff is up in right hand corner. You can load your first choice song, however after that you can't load another one.
Kyle
Last edited by kylemcgough; 08-17-2003 at 02:19 AM.
-
Did u figure it out on how I should code that?
Kyle
-
Well my example works! So it can be done...
And mind you, with info I picked up on that link I gave you!
If you had been less arrogant in your first reply, maybe I would of attached my .fla, but...
-
NOOOOOO!!!!!!
i didn't mean to sound arrogant (and if u think im groveling so i can get help with this, your right )
perty perty please help me oldnewbie
Kyle
-
Flattery will get you nowhere!
But here's the .fla. Next time, watch it!
Last edited by oldnewbie; 08-17-2003 at 08:15 PM.
-
Thank you so much!!!
One question though while im still trying to implement it into my movie, this is streaming right? I've tried copyin exactly what you have and change the handler on my box to match yours, and changed it to my songs, but they don't play
Thanks in advance again
Kyle
-
Yep! Are those long pieces?
-
They are about 3-4 minutes each, whole songs. I still can't figure this out. I guess if i keep messing with it enough, it'll be figured out
Kyle
-
Is this implemented now on your link?
Can you post this sound mc's .fla?
-
It's with the entire movie that I have.
I can email you the .fla or zip it and put it on our site for download. It's 11 MB zipped.
Its not updated on the link I sent you yet no. But that's because the link I have up will play the selected tune, however it won't repeat that. It won't load a second tune, or start playing that tune again.
But if u want I can post it on our site.
Kyle
-
Yeah! Guess you should do that! PM me the link to the zip.
I can't only get one tune to play on that link above!
Going out for a ride... Will tune in later!
-
nm, its working now!!!!!
Thank you
Kyle
-
With what you got in my .fla?
-
Yea. I got it workin with that flash file after I fooled around with it a little while, I realized my speakers weren't plugged in. Somehow they had been disconnected right when I was trying that.
Kyle
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|