Skip to main content
August 13, 2009
Answered

startDrag - loader

  • August 13, 2009
  • 1 reply
  • 705 views

Hi. im working on an image viewer and im loading an image to a loader and then add the loader to the stage.

I want the user to be able to drag and drop the image but since it's a loader i dont know how to do it.

I tried

imageLoader.startDrag = true;

imageLoader.content.startDrag = true;

but im getting an error on both.

Any one knows how can i drag it ?

This topic has been closed for replies.
Correct answer Ned Murphy

Even if the Loader class supported the startDrag method, it would be a method, and not a property as you are treating it.  Try placing the loader into a Sprite and use the Sprite.startDrag() method to get the Sprite moving.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
August 13, 2009

Even if the Loader class supported the startDrag method, it would be a method, and not a property as you are treating it.  Try placing the loader into a Sprite and use the Sprite.startDrag() method to get the Sprite moving.

August 13, 2009

Thanks, it worked.

But at the end i created my own drag function because i wanted the drag function to act in a different way.