2 songs 1 channel
Still strugling with variables in AS3. This time with the audio.
So this is my audio control which works. I added an extra variable mySongs because it seemed like that would work, but I can remove it no problem.
To the point: I want to add another mp3. Something like this:
//var mySongs:URLRequest = new URLRequest ("Audio/DisguiseCreation.mp3","Audio/FifthSpy.mp3");
AN: I thinks this lines needs to be an array, but I can't get it to work.
Then further allong in the timeline when I need the music to change (or at the click of a button) I use:
But this doesn't work, and I've tried a lot of other combinations too. There are a lot of articles on the internet about 1 song or about random songs. But really I just want a variable and select the song I want.
Ofcourse there's a cheaters way and then I simply stop the channel and make a complete new one. But then my transform won't work on all of them plus it's a lot of typing. There's got to be an easier way! :(
Hope someone can help! ^^
keep the same channel, but swap out the Sound with new URLRequest.
do use an Array if you want to change the songs per a list.
here is your code, reworked so that a button ('nextTune') will change the tune to the next one in the array.
the code of course would still need some more tweaking, but this should give you the idea of how to proceed
ps: i haven't tested this code, but it should work. i ihope that helps out
Splendid! I got it! Thanks! And it was even easier then how you discribed. I was thinking, next song? I don't want that. So I replaced the array with the new URLRequest and it worked! Yay!
I also changed myTransform to: myChannel.soundTransform = myTransform; else it will just reset itself.
So happeh! \o//