[CS3] AS2: Playing a sound n00b :)
Hi folks,
I want to have something play a sound when it is clicked, however, its a movieclip not a button. my code so far looks like this:
Quote:
onClipEvent (enterFrame) {
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
// myDegrees = Math.round((myRadians*180/Math.PI));
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._x);
_root.yMove = Math.round(_root.yChange/1);
_root.xMove = Math.round(_root.xChange/1);
this._y += _root.yMove;
this._x += _root.xMove;
this._rotation = myDegrees+90;
}
when the left mouse button is released i want a gunshot sound to play can i achieve this?
would look something like this?
Quote:
on (release) {
play("GUNSHOT_.WAV");
Any thoughts, thanks?