-
Designer, Programmer, Musician
So...with that tutorial Fruitbeard posted, you can do something like this to loop the music:
PHP Code:
onFrame (3) { mySound = new Sound(); mySound.loadSound("song1.mp3"); mySound.start(0, 999); mySound.onSoundComplete = function () { mySound.start(0, 999); } }
I've not tested it so i can't tell 100% it will work, but it should. Just replace "onFrame (3)" with the number of the frame of the scene you want the sound to start playing. It will keep playing throught all the frames until the last frame. If you don't use a stop(); on the last frame, the movie probably will repeat from its first frame, so the sound will start again over the already playing sound... so if you come up to this situation, i will read the swish tutorial to help you out.
In as2, i would do something like:
PHP Code:
onFrame (3) { if(mySound.position != mySound.duration) { trace("it's playing"); }; else { trace("it's not playing"); mySound = new Sound(); mySound.loadSound("song1.mp3"); mySound.start(0, 999); mySound.onSoundComplete = function () { mySound.start(0, 999); } }
 Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries 
-
.
Hi,
The AS2 equivalent of "int.MAX_VALUE" is " Number.MAX_VALUE"
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
|