0
votes

I have a fancy movie clip (with text and other movie clips inside it) that I want to drag

I can only drag internal parts of the movie clip but not the whole movie clip.

My NOT working example:

http://www.internetmotors.lv/temp/testgame_5.swf

http://www.internetmotors.lv/temp/testgame_5.fla (cs5)

Code:

drag_1.addEventListener(MouseEvent.MOUSE_DOWN, clickToDrag);
function clickToDrag(event:MouseEvent):void
{
    event.target.startDrag();
}

stage.addEventListener(MouseEvent.MOUSE_UP, releaseToDrop);
function releaseToDrop(event:MouseEvent):void
{
    event.target.stopDrag();
}
1

1 Answers

1
votes

answering my own question:

it seems i need to use event.currentTarget.startDrag();

instead of: event.target.startDrag();