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

after effects warning: unable to create drawing surface

Maximum number of authorizations reached!