Question:

I have flash 8 and i cant figuer out why my hittest is not working?

by  |  earlier

0 LIKES UnLike

this is my code so far:

onClipEvent (enterFrame) { if (_root.player.hitTest(enemy)) { _root.player.play() }}

as you can see my player is called player and enemy enemy

i have stopped the first frame of the player and i want it to play the rest of the frames to show the explosion

i have flash 8

this code is in the player

all the code for the player is:

onClipEvent (enterFrame) { if (Key.isDown(Key.UP)) { _y -= 15; _rotation = -10; }}

onClipEvent (enterFrame) { if (Key.isDown(Key.DOWN)) { _y -= -15; _rotation = 10; }}

onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _x -= 15; _rotation = 0; }}

onClipEvent (enterFrame) { if (Key.isDown(Key.RIGHT)) { _x -= -15; _rotation = 0; }}

onClipEvent (enterFrame) { if (_root.player.hitTest(enemy)) { _root.player.play() }}

i have also coded the first frame of "player" to:

stop();

 Tags:

   Report

1 ANSWERS


  1. flash player 9 is now needed for most games,but the last update has glitches.    here is how to get

    #9 with debugger It should work as it's older then last update. You have to remove the present flash player,(add/remove programs in control panel). reboot then download the older version.

    http://kb.adobe.com/selfservice/viewCont...

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.