Skip to main content
Participant
December 8, 2014
Question

Trying to grab a moveiclip using a dragged object

  • December 8, 2014
  • 1 reply
  • 202 views

Ok this is a hard one to explain so the best thing to do is attach the test .fla here... http://www.directionfirst.com/temp/Xmas2014_copy2.fla What I have done is draw a movie clip and with the mouse cursor it makes a grabbing movement. This is to act as a game where it will allow the users to grab objects. The problem is the object has to sit underneath the hand in the timeline which then makes it un-clickable... Is there a way around this?

Thanks

Ben

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
December 8, 2014

It might work if you set the mouseEnabled property of the hand to be false.

You might get lucky and someone might decide to download your file.  It is better if you explain your design and show your code because not everyone is willing to chance that.

Eddie_E1Author
Participant
December 9, 2014

Ok to explain further I have a movieclip that replaces the mouse cursor with:

cursor_mc.startDrag(true, new Rectangle(0,400,stage.stageWidth,0));


Then to create movieclip movement I call a label which simulates a grabbing motion.


cursor_mc.hand_target.addEventListener(MouseEvent.CLICK, insidecursor);

function insidecursor(e:MouseEvent):void

{

  cursor_mc.gotoAndPlay("insidecursorlabel");

}

Then the test clip I'm using to try and grab I do the following:

test_mc.addEventListener(MouseEvent.CLICK, test1);

function test1(e:MouseEvent):void

{

   test_mc.gotoAndStop("teststop");

}

Hope this clarifies better

Ben