Toggle on/off a looping sound

I know this one’s easy on you guys…

How do you loop a sound and control it by a toggle button. I want my sound to automatically load when the movie clip loads.



then on the properties pannel, you can set it to the amount of times that you want it to loop.

Thanks Alex, but is there a script for this? and how about the toggle buttons?

on and off buttons?

let me check, i have them on my flash site. :thumb:

on (release) {

on (release) {
    tellTarget ("music1") {

but thats the script that im using for 1, 2, and 3,. for my buttons.

Hey! I checked your site and it’s cool!

Thanks man! :slight_smile:


is the script that i gave you what you are looking for?

Actually not. but I can use it anyway.

What I need is a script for my toggle button. The music must play forever upon loading of the site. My button is a movie clip with an off/on buttons in it. If you click on the off button, the music must stop and that button will be replaced by an “on” button. (like a toggle switch).

I already made the buttons. Just the action script to stop and play the music.