Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hit test of an attached movie clip

Status
Not open for further replies.

dhere38

Programmer
Sep 12, 2000
20
US
Ok I am going to try to be clear but it will be hard. I am recreating the game asteroids. What I have done is to "attachMovie" clip (torpedo) to another movieclip (spaceship). The torpedo movieclip is a movieclip of a torpedo firing and in order to get the torpedo to take on all the characteristics of the spaceship (coordinates and trajectories)I have linked (attachedMovie clip from the library) it to the spaceship. It fires fine, and shoots in the right direction, all is well except when I try to perform a hit test on an asteroid (another movieclip). I can't seem to get them to recognize eachother, in order to tell target and explosion clip. Can any of you Flash wizards help I would greatly appreciate it. Thanks again. By the way I owe David and OldNewbie VOTEs you guys are always on your game. If you solve this one.....WOW!)
 
good morning

I know you might want to keep this to yourself, so if you want to e-mail me the fla I'll have a look and keep your secret safe.

The solution I'm guessing at is to increment a _root based variable with every duplicated/attached clip. You then utilise this variable along with a _target property on the duplicated/attached clip 'on enterframe' to determine hit-test attributes.

OK, now you see why I offer to look at the fla? LOL It would be easier for me to put it into the fla than explain it in understandable terminology (especially at this time of the morning!)

dave ;-) davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Thanks david I have sent it along. dthomas3@maine.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top