1 Reply Latest reply on Sep 17, 2007 10:00 AM by clbeech

    hitTesting

    anomicbomber
      Heya, I'm a n00b here, and know my way around some ActionScript, as well as hitTests, but I can't figure out how to make a hitTest for a movieclip within a movieclip. For Example, I have a bomb dropping on an enemy, and when the bomb hits ground (or gets smaller until frame 50), and explosion movie clip plays, within the bomb movie clip. It is called "Explosion". Except when I do the hitTest for the Explosion, nothing happens, but when I do it with the bomb itself, it does work. Here is the code, within the enemy:

      onClipEvent(enterFrame){
      if(this.hitTest(_root.Explosion)){
      gotoAndPlay(2);
      }
      }

      It goes and plays the second frame of the Enemy movieclip, which is it breaking into pieces.

      Any help?
      Thanks!


      --- Matt