Basic Constructs and Interactions - AS3
Tutorials in this section illustrate basic constructs and basic user interactions in Flash CS3 and Flash CS4: dynamic and input text fields, buttons, moving objects on the stage, handling mouse clicks, simple dragging and simple drawing at runtime. We also demonstrate several Flash CS3 and CS4 components in action including: RadioButton, ComboBox, and ColorPicker. The tutorials on this page are suitable for beginners. You can find many new beginner-level short tutorials in the AS3 How-To and Tips category linked above. Be sure to check it out!
- Making Custom Buttons in Flash CS3
An introductory tutorial. We will show you how to make your own
button and explain Flash's authoring environment.
- Using Textboxes in an Arithmetic Quiz
In this tutorial we walk you step-by-step through creating an arithemtic
quiz in Flash CS3. The tutorial demonstrates
dynamic and input text fields, buttons, and the random number generator.
It also explains "Publish Settings".
- Simple Line Segment: Creating Sprites
and Shapes from Mouse Clicks
We guide you through creating a simple
applet in which line segments are dynamically drawn as the user clicks on a board.
The fla files are provided for enhancements and making vertices draggable.
The new drawPath Method in Flash CS4
This simple tutorial illustrates the drawPath method and the Vector class (new to Flash CS4) by creating a filled polygon and a "curved" polygon with draggable vertices. We focus particularly on the "winding" protocols for filling overlapping regions.
- Using the Timer and Date Classes in Flash CS3 and ActionScript 3 In this tutorial, we use simple examples to illustrate the AS3 Timer and Date classes and their basic methods.
We explain how to use a Timer object to create animated motion or a repeated event. In one
of the examples, the user generates a random number and a game piece moves around a board that number
of spaces. In another example, we show how to combine the Date class with a Timer object to create a digital clock effect.
- ColorPicker Component in Flash CS3, Drawing with the Mouse in AS3 This tutorial shows
how to apply the new and really cute ColorPicker component in Flash CS3. We built a simple applet in which the user can draw
on the screen using the mouse. The user chooses color using the ColorPicker.
- Loading Random Images from an XML List in Flash CS3 Learn how to store images' addresses in an external XML file
and load them randomly at runtime. We give a few simple examples:
a random image is loaded when a button is clicked; a random image is
chosen when the swf loads; several images are randomly shuffled.
We illustrate the difference between the AS3 Loader and the URLLoader
- LaTeX2swf Utility, Mathematical Notation, and ScrollPane Component in Flash CS3 In this multi-prong tutorial, we show how to use a LaTeX to swf utility to insert elegant, scalable scientific formulas into
your Flash movie. We also discuss the ScrollPane component. We show how to configure the component and how to use it for displaying
photographs, text, or formulas.
- Using the Tween class in Flash CS3 and ActionScript 3 We give several examples of using the new class in AS3 - the Tween class. This class
allows for easy creation of interesting visual effects and animations. We build
control panels that smoothly slide in and out of place, with a nice 'bounce' to them. We also show
a 'spin and snap back when dragged' example.
- Using the TransitionManager Class in Flash CS3 and ActionScript 3
We discuss and present examples of how to use a very useful yet somewhat underdocumented AS3 class:
the TransitionManager. The class allows for creating many cool transition effects between MovieClips,
including Wipe, Blinds, PixelDissolve, Photo, Zoom and others. We show examples of each. We also demonstrate in action
the events 'allTransitionsInDone' and 'allTransitionsOutDone' that are discussed in LiveDocs and seem to work well.
We give several simple examples, and then build an xml-driven slide show that uses transitions.
- Changing Color of Movie Clips in Flash CS3, ColorTransform in AS3 We show two applets in which we use the DisplayObject.transform.colorTransform property
of ActionScript 3 to change at runtime colors of movie clips created at authoring time.
We discuss ColorTransform class and show how to use it.
- Mouse Drawing with Eraser, Custom Mouse Pointer in Flash CS3 This tutorial
extends Drawing with the Mouse tutorial by adding an eraser. In this version, we use simple masking,
instantiate at runtime a clip created at authoring time, and show how to create a custom mouse pointer
in ActionScript 3.
- A Tour of Drag and Drop Techniques in Flash CS3 This multipage tutorial is written in html so that the active examples will help you understand how to implement effective drag and drop interactions.
- Using the combo box component for matching
problems A simple applet that may prove very effective when
teaching proofs. The applet is created using a Flash CS3 built-in component, combo
- Using the radio button
component for a multiple choice question Another simple applet
and another component: the radio button in Flash CS3.
- Circular Motion. Working with Movie Clips Created on the Stage This tutorial shows
how to create movie clips at authoring time, assign instance names to them,
and manipulate them programmatically.
Kaleidoscope Effects in Flash CS4
We use the new ActionScript 3 method, graphics.copyFrom, supported by
the Flash Player 10, to create spectacular kaleidoscope effects.
We provide a custom AS3 class, Kaleidoscope, that can easily be customized
in all respects. A simple change in the intial image passed to the
constructor produces dramatic changes in subsequent kaleidoscopic images.
Fun to play with!
Consider our book: Flash and Math Applets: Learn by Example which is available at amazon.com.