Flashandmath.com Site Search

Intermediate Techniques - AS3

Tutorials in this section illustrate objects and user interactions in the contex of more complex applets than in the Basic Constructs and Interactions section.

  • NEW! Creating Event Listeners Dynamically in AS3 and Flash CS3, The Lights Out Game  We present the Lights Out Game in which the number of cells is randomly generated at runtime with each new game. Thus, the click listeners attached to each square have to be created on the fly. The listeners are similar but different for each square. Don't miss this interesting tutorial written by James Hamblin.
     
  • NEW! XML-driven Check Box and Combo Box Quizzes in Flash CS3  We show a simple way to create quizzes that use CheckBox or ComboBox interfaces. Questions and answers are pulled at runtime from an external XML file.
     
  • NEW! A Gummy Bitmap: Custom Bitmap Transformations in ActionScript 3  We show our custom AS3 BitmapTransformer class in action. In one example we have a bitmap whose vertices can be dragged in an arbitrary way and the image is distorted accordingly in all sorts of contorsions. In the second example, we throw in a dash of tween, and create 'an elastic' image. Great visual effects!
     
  • Tween Tricks in ActionScript 3 and Flash CS3  In this tutorial we explore less common ways of using the AS3 Tween class. The class is remarkably flexible. Instead of tweening properties directly related to motion or appearance, we tween a property of an auxiliary object. We show how to use the technique to create tweened nonlinear motion, tweened text effects, and a 'balloon' effect. We also illustrate the built-in AS3 easing functions.
     
  • An XML-based RadioButton Quiz in Flash CS3  Learn how to create a simple quiz interface supplied with content from an external XML data file. This particular quiz structure uses only RadioButton components, but the ideas are adaptable to other interfaces as well.
     
  • The Display List, The Stage, and addChild in Flash CS3  We start from a very elementary example of a "solar system" animation and use it to explain the child-parent relationship in ActionScript 3 and Flash CS3. We discuss the notion of the Display List in Flash CS3, and explain the concept of the Stage and the meaning of the keyword "stage" in AS3.
     
  • Depths Management in Flash CS3 and ActionScript 3  We discuss the depths model in ActionScript 3 and the basic depths management methods: addChildAt, setChildIndex, swapChildren, swapChildrenAt. We give a 3D example and a drag and drop examples involving depths issues.
     
  • Creating, Deleting, and Accessing Display Objects at Runtime in Flash CS3. The 'name' Property of Display Objects  The need for creating, deleting and manipulating a non-predetermined number of display objects at runtime is a frequently encountered issue when programming highly interactive applications, for example games or math applets. The approach to that and related issues is dramatically different in AS3 from the way it was in AS2. In this tutorial, we look at two examples, in which we examine how the features of the Display List, the 'name' property of DisplayObject and getChildByName method can be used to make such programming tasks easier.
     
  • Areas Behind Display Objects and Mouse Events in Flash CS3. Reparenting in AS3  We discuss the issue of how overlapping display objects respond to mouse events and show displayObject.mouseEnabled property in action. We show how to change the parent of a display object. It is very easy in ActionScript 3! The tutorial provides a refresher on local and global coordinates as well.
     
  • Masking in Flash CS3  The tutorial shows dynamic and programmatic masking techniques in ActionScript 3, including transitions between images and masks animated with the EnterFrame event. As one of the examples, we show a mathlet that relies on masking.
     
  • Using the Custom Math Parser  This tutorial shows how to use the MathParser class that is available on this site. Examples include simple computation and answer checking. The same class is used in the Simple Function Grapher tutorial that follows.
  • A Simple Function Grapher in Flash CS3  In four setps, we explain how to built a simple function grapher in AS3. The user can choose the x and y ranges as well as the function being graphed. This simple applet uses our custom mathematical expressions parser in ActionScript 3. The AS3 parser is contained in a custom class MathParser. You can download the parser and all other relevant files from the tutorial.
     
  • Creating a histogram with runtime drawing  A step-by-step tutorial that reinforces the ideas of dynamic drawing in Flash CS3 and shows a method of parsing the user's comma-delimited input.
     
  • Animating using the "Enter Frame" event  The tutorial explains in detail how to animate a bouncing ball programmatically in AS3.
     
  • Loading External Clips and Videos in Flash CS3 This multipage tutorial is written in html so that the active examples will help you understand how to load and control movie clips defined in external swf files, including those with embedded Flash video files.
  • An Animated Family of Functions  We use the same technique as in the previous tutorial to animate a family of trigonometric functions in AS3.
     
  • Drawing in a window at runtime  The user clicks on two points in a graphing board. The points and the line between them are dynamically drawn.
     
  • Flash Forum Custom Classes: Modifying Appearance  We show how to easily modify the appearance of a parametric grapher written in ActionScript 3 from our Flash Forum article "Flash Tools for Developers (AS3): Graphing Curves in the Plane". We provide a package of custom ActionScript 3 graphing and parsing classes.
     
  • Creating Textboxes at Runtime in Flash CS3  A simple matrix multiplication applet. However, the user is allowed to choose the dimensions as well as the elements of matrices. Hence, all textboxes have to be created at runtime via AS3.

flashloaded logo

Flash Components

PSD to HTML

PSD to HTML

DigiCrafts Logo

Flash Components

Page Flip Component

Page flip flash component

Flash Photo Gallery

Flash Photo Gallery

Your Ad Here

Your Ad Here

Link to mathdl.org

MathDL at maa.org

Link advertising page

Advertise with us









We welcome your comments, suggestions, and contributions. To contact us, email Barbara Kaskosz at barbara@flashandmath.com or Doug Ensley at doug@flashandmath.com.