Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Looping audio throughout without it overlapping?

New Here ,
May 17, 2019 May 17, 2019

I want to loop audio throughout my project, so I have simply placed the audio on the timeline and used Properties to make it loop. However, when I use a button to return to the first frame of my project, the music starts playing over itself. How do I avoid this? I looked for solutions, some suggested forgoing the timeline and using ActionScript to play the audio, but I can't seem to find instructions with the code to do that and make it looping. Would appreciate any help! Thanks

3.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 17, 2019 May 17, 2019

assign your sound a class (or linkage id) in the library panel (eg, Sound1) and use:

var alreadyDefined:Boolean;

if(!alreadyDefined){

alreadyDefined=true;

var sound1:Sound=new Sound1();

sound1.play();

}

Translate
Community Expert ,
May 17, 2019 May 17, 2019

assign your sound a class (or linkage id) in the library panel (eg, Sound1) and use:

var alreadyDefined:Boolean;

if(!alreadyDefined){

alreadyDefined=true;

var sound1:Sound=new Sound1();

sound1.play();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2019 May 17, 2019

Thanks a lot, how do I make the sound loop?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 17, 2019 May 17, 2019

Never mind, I figured out the loop part. Thanks a lot!!!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2019 May 17, 2019
LATEST

you’re welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines