Vzero Posted September 1, 2007 Share Posted September 1, 2007 Hey I'm making a game and the collision code doesn't exactly work on a copyed movie clip:if (this.hitTest(_parent.block) || this.hitTest(_parent.paintblock)) {_x=0_y=0}What do I have to do to fix thatAnd how can I make a program that copys a movieclip Link to comment Share on other sites More sharing options...
Synook Posted September 2, 2007 Share Posted September 2, 2007 What do you want to be moved to (0,0)? _x and _y are properties, so say if I wanted the "square" object to move to (0,0) on a true hitTest, then I would have if (this.hitTest(_parent.block) || this.hitTest(_parent.paintblock)) { square._x=0; square._y=0;} I'm not too good with ActionScript though... what is the problem? Link to comment Share on other sites More sharing options...
Vzero Posted September 4, 2007 Author Share Posted September 4, 2007 For some reason the this.hitTest code doesn't work on copyed objects and I'm having some trouble copying some of the movieclips through code in the game. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 4, 2007 Share Posted September 4, 2007 What do you mean by a copied object? Can you show the code that does that? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.