# \[F8/AS2\] Working with sound

**URL:** <https://forum.kirupa.com/t/f8-as2-working-with-sound/217140>\
**Category:** flash\
**Created:** [February 23, 2007, 12:06pm UTC](https://forum.kirupa.com/t/f8-as2-working-with-sound/217140 "2007-02-23T12:06:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waywoodr](https://avatars.discourse-cdn.com/v4/letter/w/3be4f8/32.png) [@waywoodr](https://forum.kirupa.com/u/waywoodr)\
**Post date:** [February 23, 2007, 12:06pm UTC](https://forum.kirupa.com/t/f8-as2-working-with-sound/217140/1 "2007-02-23T12:06:15Z")

</div>

I have been having trouble while working with sound.  
I have an audio clip which i have cut into 4 sections.  
(intro, intro-loop, main, main loop.)  
I wish to play the first section then loop the second section until a value returns true.  
When the value returns true, i want the third section to play after the second has finished its current loop. After the third has played I want the final section to loop forever.

I have tried to do this many ways, via script, putting it all into the time line of a movie clip, but no matter what I try i always get either a gap between the sections or no sound at all.

It may sound like a weird thing to want to do with audio, but I want the second section to loop (after the intro) until the user has clicked the “Enter Site” button, with no gaps or jumps. Then once a variable gets set to true then I want to continue playing into the main part of the music, but i don’t know how.

I haven’t had much experience with sound, can anyone help me?

Regards,
