Skip to main content
Participating Frequently
May 14, 2008
Answered

Looping Sound

  • May 14, 2008
  • 4 replies
  • 427 views
I have a page that plays an MP3 file but I want the music to loop. My code is below HOW do I ad the loop language.????????
This topic has been closed for replies.
Correct answer kglad
the first parameter is the sound offset. the second is loops. so use:

sc = music.play(0,3); // for no offset and 3 loops

4 replies

kglad
Community Expert
Community Expert
May 15, 2008
you're welcome.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 14, 2008
the first parameter is the sound offset. the second is loops. so use:

sc = music.play(0,3); // for no offset and 3 loops
3storeysAuthor
Participating Frequently
May 15, 2008
Thankyou .....it works perfectly now
3storeysAuthor
Participating Frequently
May 14, 2008
Okay, this may seem like a really silly question but does that mean all I have to do is add a three to the bracket , for it to play 3 times. I find Flash help particularly unfriendly and could not find the play method parameters

sc = music.play(3);
kglad
Community Expert
Community Expert
May 14, 2008
check the flash help files under as3/sound/play method: the play() method takes 3 parameters one of which is the number of loops.