What a Drag

images

THE StartDrag() METHOD accepts a number of optional parameters that allow you to constrain the drag, that is to box it in to specified dimensions and it’s really easy to do.

 

ActionScript 3.0

images

1 In this example, we’re using a Movie Clip symbol, because the MovieClip class supports startDrag() and stopDrag() methods. The movie clip has the instance name smileyFace. This code goes in a keyframe where that movie clip starts. Two event handlers, this time. The MouseEvent. MOUSE_DOWN event occurs when the user clicks the mouse over the ...

Get How to Cheat in Adobe Flash CS4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.