dimanche 27 décembre 2015

Adding sound to a MovieClip event in Adobe Flash

Basically I have this sound effect that id like to add to my movieclip. What happens is when I touch the ball (movieclip) it moves to a new location, speeds up and the score climbs. At the exact point the ball is touched, id like the sound effect to play. Here is the code for my ball touch

    function fl_TapHandler(event:TouchEvent):void {
_touch = true;
timmyTimer.reset();
score +=1;
mcBall.x = Math.floor(Math.random() *(stage.stageWidth - mcBall.width));
mcBall.y = Math.floor(Math.random() *(stage.stageHeight - mcBall.height));
mcBall.nextFrame();
removeChild(mcBall);
timmyTimer.reset();
timmyTimer.start();
updateScores();

}

Aucun commentaire:

Enregistrer un commentaire