-
[RESOLVED] AS3 hitTestObject Question
I have used a "for loop" to create a number of Sprites.This same loop names the Sprites and places them in an array. That array is used to add and locate the Sprites on the stage.
The problem I am having is when I attempt to use the Array index in a "hitTestObject" statement ie; if(myObject.hitTestObject(spriteArray[3]))......with the accompanying code being trace("hit"). I get "hit" displayed on the output panel,whenever "myObject" collides with any Sprite from that array. How can I make these hits spicific to the particular object from the array.
Thanks
Mango
-
I am writing to myself here. I have resolved this by changing the code from "eventCurrentTarget" to "event.Target. I don't understand why this works.I imagine that lack of understanding will come to haunt me at a future date.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|