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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.