FREE Flash CS3 Tutorials
In This Flash CS3 Tutorial you will learn how name a movieclip and startDrag method
Gordon French is a professional Flash CS3 Programmer and Designer.
He also attends the Art Institute in Denver where he majors
in Interactive Media and Design.
You will find Flash Games, Flash CS3 Tutorials, and Lots of General FREE Flash tutorials.

Index.html
Flash_Concentration.html
new_in_3.html
Flash_Asteriods.html
what_is_AC.html
history_of_AC.html
AC_index.html Flash CS3 Tutorial Naming Basics
Flash CS3 Tutorial DragAndDrop
Flash CS3 Tutorial SoundBasics
Flash CS3 Tutorial Graphics
http://www.f2-4kids.com

ActionScript

Flash CS3 Tutorial, Drag and Drop?

StumbleUpon Toolbar


Naming Objects
The very basics of ActionScript are the objects and classes. Sound, Graphic and Text are a few examples of Data Type Objects. A data object can pull infromation from a souce of you choice, such as an array, XML or simply the time. All objects belong to a larger group refered to as classes. Flash has prebuilt class that help flash understand how to handle data. such as Array, Math, Sound and Video.

Objects need to be named for ActionScript to be able to use them.
When you have the object on the stage and selected you can enter the name in this field.

Appling a Method
In the file you will find a box called “box”. First you need to name the box, currently it is called box in the Libary, but for ActionScript it needs to be named in the Properties panel. (see example above). Click on the box symbol and go to the Properties panel. Name this box “box_mc”

The object has been named, so lets make the object do something, such as following the mouse around. Open the Actions panel (press F9)

Flash CS3 Actions

select the first key frame in the actions layer and

ActionScript

then add the following code:

box_mc.addEventListener(MouseEvent.MOUSE_MOVE, drag);
function drag(event:MouseEvent):void{

box_mc.startDrag();
};

This Code calls the method “startDrag()” a built in in feature of Flash CS3. You named the box “box_mc“ so “startDrag()“ is applied to “box_mc“

Now press contol-enter to publish this file. When you run your mouse over the .swf you will see the box follow your mouse. A .swf is the file extention that flash uses to create a file refered to as a movie. You can then embed the .swf into an html page. If you havent changed the name of your flash file you will see that pressing control-enter created a new file called start01.swf.


Continue SmileyPress Control-Enter and test you movie.

Download Flash CS3 Source Files

Flash CS3 Tutorials, Copyright FrenchSquared 2008
ActionScript