Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sound in button will not work 1

Status
Not open for further replies.

johnnyv

Programmer
Jul 13, 2001
216
CA
hello
I am creating my first flash site. It is made up of 3 seperate MC's. one of the movie clips is a line of buttons. When I mouse over the button I want a small mp3 file to play. I can get this to work when I play the swf file that makes up the buttons. But it only works when I play the swf file on its own. When I bring the swf file into a MC that is part of the movie that makes up the site it will not work.
Here is the code that I am using
on (rollOver) {
_root.slidemenu.loadMovie("personalslidebuttonbar.swf");
butsound = new Sound();
butsound.attachSound("buttonoversound");
butsound.start(0,1);
}

I think it may have something to do with file path and root directory, the fact that the button MC is part of another movie but I am a rookie at this stuff so maybe not.

any ideas?

Thanks in advance for any replys as always I wouldn't get far without them
 
Although MM says the parameter is optional, add this to your sound object's definition... Like so...

butsound = new Sound(this);




Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top