(fmx) Sound by actionscript

Hello people,

I was wondering if it is possible to attach sound to a button by using pure actionscript. So I don’t mean the most common and easiest way by attaching the sound onto the frames of the button. What I do mean is the opposite of ‘StopAllSounds’ in :

[AS]
on (rollOver) {
gotoAndPlay(12);
stopAllSounds();
}
[/AS]

Thank you for your time !

check this out;) . i think this will help you.
http://www.kirupa.com/developer/actionscript/sound.htm

now in this method the sound gets exported with the swf right???

and if so doesnt it make the file size igger???

Oh my, I went searching into the Flash MX articles and in my rush I forgot about the Actionscript…stupid me :crazy: !
Anyway, that’s completely what I wanted to achieve, thank you for pointing me into that direction e.s.x.s.

In my opinion, file size doesn’t change at all. It is just the way how the sound starts that is explained.

u r welcome Suppi :slight_smile: