Skip to main content
Inspiring
October 18, 2006
Answered

Drag and Drop

  • October 18, 2006
  • 1 reply
  • 7141 views
Hi all,

I'm building an app where the user effectively can construct a "Slide" with textboxes and images. With the images the user clicks and drags over the screen and is then asked for the file they want to show. This is uploaded onto the server and moved into the correct place at which point I create the image on the stage at the chosen location and scale it to best fit the dragged area...code below.

What I also want is to enable the user to drag and drop the image if they want to move it around.
This is where Im stuck

How can I attach the startDrag code to this movie, or do I need to setup a listener? I've sorta cobbled this together so far and can't seem to take it that final step. Any help - such as the code - would be realllllllly appreciated!

Thank in advance!
Phil
This topic has been closed for replies.
Correct answer phil_ashby
Got it!

added this inside the resizer listener

evt.onPress = function() {
evt.startDrag();
};
evt.onRelease = function() {
evt.stopDrag();
};

1 reply

phil_ashbyAuthorCorrect answer
Inspiring
October 18, 2006
Got it!

added this inside the resizer listener

evt.onPress = function() {
evt.startDrag();
};
evt.onRelease = function() {
evt.stopDrag();
};