SOUND Help

I’m loading sound into my presentation like this


mySound = new Sound();
mySound.loadSound("latinmusic.mp3", false);
mySound.start("", 999);
mySound.setvolume(30 );

What I can’t figure out is how to hit a button to pause and then to play again. Can somebody help, please? :smirk:

Sorry should have looked in the threads a little harder.

the answer was


on (press) {
	_root.mysound.stop();
}

and


on (press) {
	_root.mysound.start();
}

duh!!!
I wasn’t going back to _root.

Sorry again for posting

well, i was working in the last 30 minutes in this topic, but my flash i think got nuts…

here i go: you said you want a button to pause not to stop the sound. with that script you stop and then the sound will begin from the beginning, “analyse this”:

som1 = new Sound();
som1.loadSound(“music.mp3”, false);
som1.start("", 999);

ok , this will load the sound and start playing, but i create a mc, with this script:

onclipEvent(enterFrame){
posicao = _root.som1.position;
//this will hold the position of the sound as an integer
this.mc_text.text = posicao;
//in this mc have a dynamic text field, i use this to see if the
//position property was working, it will update the position
//every o,1 seconds
}

and in the buttons i added this:

on(release){
som1.start(mc_text.posicao, 99);
}

and the sound don’t begin!!! it had to start from the last position… but it simply don’t starts…

But when I tried it the the sound wouldn’t start up from the load of the flash presentation. And when I hit the buttons they work to turn the sound on and off. Wierd to me.

Do you have any suggestions?

Could you upload your .fla to show me?