Hello, hope you can help.

I'm doing a basic hitTestPoint which works fine when everything is placed on the root of the flash file. However it fails when all the elements are placed within a movieclip.

I've a feeling the problem is due either to the registration of the objects changing once they are placed in the new movieclip symbol, the 'relativity/absolutness' of my referencing or the "hitTestPoint (dragable_object_mc.x, dragable_object_mc.y, true)" part of my code.

I've been playing around with it all for hours now and am at a bit of a loss, so any help would be appreciated.

My code is as follows:

I have two movieclips:
dragable_object_mc - which you can pick up and drag
static_crashzone_mc - If you drag the other object into this a collision is 'traced' in the output window
(it works fine until I place the _mcs and code into a new _mc symbol)

Incidentally if I use the 'hitTestObject' code on the root or within a movieclip, it works fine.


//Pickup with mouse - works fine
dragable_object_mc.addEventListener(MouseEvent.MOU SE_DOWN, bracketDrag1);

function bracketDrag1(myevent:MouseEvent):void
{
dragable_object_mc.startDrag(false/*, myBoundaries2*/);

}

///////////////////////////////

//PutDown with mouse - works fine
dragable_object_mc.addEventListener(MouseEvent.MOU SE_UP, bracketstopDrag1);
function bracketstopDrag1(myevent:MouseEvent):void
{
dragable_object_mc.stopDrag();
}

///////////////////////////////


//collision HITtestPOINT - This bit works fine when everything is on the root, however fails if all _mcs and code are placed in a new _mc
addEventListener(Event.ENTER_FRAME, objectCollision);

function objectCollision(myevent:Event):void {
if (static_crashzone_mc.hitTestPoint (dragable_object_mc.x, dragable_object_mc.y, true)){
trace ("collision");


}
}

stop();
I can email a FLA file if it helps?
Many thanks in advance

MF