mindfriction
March 12th, 2004, 08:15 AM
Hey guys,
Ive been making some advanced buttons with some trendy transitions using Lostinbeta's onEnterFrame/ hitTest method below:
//this script is on my mc (which is the button)
onClipEvent(enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
transition_mc.nextFrame();
} else {
transition_mc.prevFrame();
}
}
Can anyone tell me how to load an mp3 for the buttons sound effect?
This is what I have been doing (below), but it simply just doesn't work. The sound keeps on being played repeatedly whilst the mouse is over the button. I knew this would be the case but I just cant think of any other solutions..
onClipEvent(enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
buttonSfx.start(0,0);
this.nextFrame();
} else {
this.prevFrame();
}
}
buttonSfx = new Sound(this);
buttonSfx.loadSound("SFX/click.mp3");
Thanks in advance! :smirk:
Ive been making some advanced buttons with some trendy transitions using Lostinbeta's onEnterFrame/ hitTest method below:
//this script is on my mc (which is the button)
onClipEvent(enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
transition_mc.nextFrame();
} else {
transition_mc.prevFrame();
}
}
Can anyone tell me how to load an mp3 for the buttons sound effect?
This is what I have been doing (below), but it simply just doesn't work. The sound keeps on being played repeatedly whilst the mouse is over the button. I knew this would be the case but I just cant think of any other solutions..
onClipEvent(enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
buttonSfx.start(0,0);
this.nextFrame();
} else {
this.prevFrame();
}
}
buttonSfx = new Sound(this);
buttonSfx.loadSound("SFX/click.mp3");
Thanks in advance! :smirk: