-
Hello Board!
I´m trying to use some external mp3 files as background sounds to a flash site, but I can´t find any way to loop it.
Can someone help me to get the sound to loop???
Please help me, if you know the answer!!!
-
Senior Member
variable.start(0,100) // where 100 is how many times it will loop
-
Realy this simple???
Is it realy that simple???
I´m using an external mp3-file as background sound!!!
-
Senior Member
-
no it´s not!!!
I don´t think it was realy that simple, I attach my code to let you see if I have made anythin wrong!!!
Here is my code for playing the sound:
function playMusic(song){
MittLjud_sound.stop();
MittLjud_sound=new Sound();
MittLjud_sound.loadSound(song,true)
MittLjud_sound.setVolume(MittLjud_sound.getVolume( ) -50);
// supose to start the sound then loop it 100 times.
MittLjud_sound.start(0,100);
}
playMusic("bg.mp3");
-
Senior Member
rewrite the code like this;
MittLjud_sound=new Sound();
MittLjud_sound.loadSound("bg.mp3",true);
MittLjud_sound.setVolume(50);
MittLjud_sound.start(0,100);
-
OK!
OK! Thanks!!!
But am I able to chang the background sound from within my flash movie if I set ("bg.mp3",true);???
Can I still change this from a button???
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
|