4 Replies Latest reply on May 12, 2007 8:58 AM by kglad

    Playing a sound clip in a game, mx 2004, please help

      Hi all,

      I'm working on a game tutorial just now. I want to add some sound into it. Specifically, I want a sound clip to play when the player is hit. Here is the code that controls the players hit & lives decrement:

      if (_root["bomb"+bombi].hittest(_root.playerClip)) {
      _root.lives -= 1;
      // lives are all gone
      if (_root.lives<=0) {
      // go to start

      I believe that I can insert to code here. It is a very small sound clip and I just want it to be triggered by the same event as the live decrement - the hit test.

      Can anyone help?