# Looping music and problems

**URL:** <https://forum.kirupa.com/t/looping-music-and-problems/321634>\
**Category:** flash\
**Created:** [April 26, 2011, 11:37am UTC](https://forum.kirupa.com/t/looping-music-and-problems/321634 "2011-04-26T11:37:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macca26](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@Macca26](https://forum.kirupa.com/u/Macca26)\
**Post date:** [April 26, 2011, 11:37am UTC](https://forum.kirupa.com/t/looping-music-and-problems/321634/1 "2011-04-26T11:37:19Z")

</div>

Hi guys,

Ive got a short music clip, about 30 seconds long. I want this music to loop across the whole game in the background. Ive got the music playing fine but obviously, it doesnt loop. Now if i go into the options from the first frame, then go back to the main menu, the music plays over the top of the already playing music. Does anyone know how to make the music play in one continuous loop and not have it play again everytime i go back to the main menu?

Thanks

EDIT: Ive got the sound to loop by using  
music.play(0, int.MAX\_VALUE);

Just need it to not start a new loop everytime i go back to the main menu.
