Armand P
Armand P

Reputation: 100

Flash drag strange behavior

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();
}

Upvotes: 0

Views: 63

Answers (1)

Armand P
Armand P

Reputation: 100

answering my own question:

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

instead of: event.target.startDrag();

Upvotes: 1

Related Questions