Drag and Drop
Make it draggable
To make an interface element on the stage draggable you will need a combination of the movie symbol and a button symbol.- Create a movie symbol with button symbol inside it.
- In the button event handler enter the following code
on(press) { startDrag(this); } on(release) { stopDrag(); }We also added the dynamic text. Variable "thetext" has been assigned to the text and it's "selectable" property has been unchecked in Properties Inspector – to prevent interference of the text and the button itself.To change the text we added thetext="thank you"; to on press event and thetext="drag me"; on release event