O'Reilly logo

How to Cheat in Adobe Flash CS4 by Chris Georgenes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required