hitTestObject as a Child


i creating real time fighting game, , on stage have 2 boundary boxes (movieclips). there 2 character movieclips, each added child respective boundary box through timeline code. in each of these movieclips, there hitbox, which, animations, has it's .visible property set false. need boundary box detect when being hit visible hitbox, , run damage function based on variable set in animation.

how do that?

every time try hittestobject(movieclip(parent).box.char.hit) tells me doesn't exist.

- set hit box visible true , use alpha = 0 instead.

- hit test:

if(box1name.hittestobject(box2name))

{

// run damage function

}



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Adobe Reader DC install error 150410

Error: 100600 Update failed, updates have been disabled by your system policy

ReferenceError: Window does not have a constructor : 325