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!

Attach Sound To Movie Clip 1

Status
Not open for further replies.

coldfused

Technical User
Jan 27, 2001
2,442
US
Guys I have a movie clip that glides into place over the top of a button when the button is moused over. I'm trying to get a sound to play but only when the clip comes to a stop over the button. All works fine except the sound won't play. I have code that controls the slide on the time line and the button but i wont post that as there probably is no need.

When the clip loads I attach the sound, on mouse over i play the sound. But it doesnt work...Any Ideas what im doing wrong?

Code:
onClipEvent (load) { 
xMove = _x; 
easeSpeed = 5;
//load sound
var my_bleep:Sound = new Sound();
my_bleep.attachSound("bleep");
} 
onClipEvent (enterFrame) { 
_x += (xMove-_x)/easeSpeed;
}
onClipEvent (mouseUp) {
my_bleep.start();
}

Thanks,
Carl

----------------------------------------
Orlando Web Design
 
Are you sure that you have exported the sound to actionscript?
 
Actually It works fine my thinking was all screwed up. I want the sound to load when the easing stops. Which was why I placed it in the mouseUP event, which works fine after you click the damn mouse down of course.

I was thinking mouseOver, but you cant do a mouseOver on a clip event.

Amy ideas how I would load the sound after my easing stops? Only when the easing comes to its position over the button...

----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top