View Full Version : hitTest on MovieClip duplicates.

05-13-2005, 08:29 AM
Hello Everyone I hope you can help me!

I'm currently trying to make a lil flash game and I'm having lots of problems!

However the one which is most important for me to sort out is my hitTest problem!

At the moment I have a knight whos has to bash dragons with his sword. For the moment I'm trying to get hittest working on the Kinght.

This ActionScript is part of the Knight,

onClipEvent (enterFrame) {

//The below roots the Knights to the mouses movement.
_x = _x+(_root._xmouse-_x-90);
_y = _y+(_root._ymouse-_y-70);

//This is my hitTest code, the one thats giving me trouble!
_y = 500;

onClipEvent (load) {
i = 100;


on (release) {//This duplicates an original movieClip called drag.
newNovieClipName = "dragon"+i
depth = i;

//As you can see each new instance is called dragon10?
duplicateMovieClip(_root.drag, newNovieClipName , depth);


What i need is mt hit Test sorted out, I've treid things like _root.dragon+i and +depth but neither work.

Can anyone lend me a hand?

05-14-2005, 10:09 PM
Follow a tutorial or 2.