# (F5) Sound script help

**URL:** https://forum.kirupa.com/t/f5-sound-script-help/11004
**Category:** Uncategorized
**Created:** [January 10, 2003, 3:32pm UTC](https://forum.kirupa.com/t/f5-sound-script-help/11004 "2003-01-10T15:32:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ToddziLLa](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@ToddziLLa](https://forum.kirupa.com/u/ToddziLLa)
#### Post date: [January 10, 2003, 3:32pm UTC](https://forum.kirupa.com/t/f5-sound-script-help/11004/1 "2003-01-10T15:32:28Z")

</div>

I have 4 sounds, named and linked by the names sound1, sound2, sound3, sound4. I want a button that changes those loops on the click of it. The button has this script:

on (press) {  
\_root.number=\_root.number+1;  
if (\_root.number==4) {  
\_root.number = 1;  
trace (\_root.number);  
}  
\_root.Sound.loop.stop();  
\_root.Sound.loop.attachSound(“loop”+\_root.number);  
\_root.Sound.loop.start(0, 999);  
}

Uhh…it doesn’t work. Can anyone tell me why and post one that will work? Thanks a lot.
