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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing sound dinamically

Status
Not open for further replies.

LastCyborg

Programmer
Feb 7, 2003
256
MX
How can I make that if mouse over an object play a sound imported to the library?

 
Set up a sound object like this on the main timeline:

mySound=new Sound(this);
mySound.attachSound('librarySound');

And on the button:

on(rollOver){
mySound.start();
}

Depending on where your button is in the movie you might need to add a path to 'mySound' in the button code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top