Flash Widget Collection
Document Contents:
Introduction
Basic Image Composition
Animation and Interactivity Fundamentals
ActionScript Fundamentals
ActionScript for Customized Interactions
Sample Interactions & Navigation Widgets
Flash and External Media Content
Flash and External Data
Introduction
The Flash widgets included on this page were created to support learners of Flash. They are not intended to teach anyone Flash from the ground up, and I use them as supplements to my courses. To learn Flash for real, you might try a commercial book or working through the tutorials that ship with the program.
Each widget file demonstrates one (or an otherwise small number of) core technique(s). All ActionScript is thoroughly documented, so open the FLA and spend some time looking around!
A few of these files are intended to demonstrate how Flash files can integrate with external files, such as external Flash SWFs, XML data, and so on. In some cases, these require special environmental settings to work (e.g., a certain server environment). Special requirements are spelled out in Readme files so read them before you write to tell me they are broken!
I accept requests, so if you are one my current students and have a Flash widget request, please send me an email!
For most examples, I provide authoring (FLA) files as well as output (SWF) files. As a rule, I recommend you download the FLA, open it in Flash, and test the movie (Control > Test Movie) to generate your own SWF, but if you want a quick glimpse of what something does, you can click the SWF link.
All file sizes are reasonably small (<100k), unless otherwise noted.
Basic Image Composition
A Flash image composition: Learn the basics of layers, the library, etc.
Wen.fla (500k) | Wen.swf
Animation and Interactivity Fundamentals
Animation Basics: Tweens, motion guides, morphs, and more
AnimationBasics.fla | AnimationBasics.swf
Timeline Control with Buttons: Enable users to navigate the screens of your application
ButtonTimelineControl.fla | ButtonTimelineControl.swf
ActionScript-Based Animation
ASAnimationOnEnterFrame.fla | ASAnimationOnEnterFrame.swf
Animation With Controls: A looping animation with a walk cycle, nested animation, synchronized audio, and button-based ActionScripted timeline controls (courtesy of Christian Briggs).
AnimationWithControls.fla | AnimationWithControls.swf
ActionScript Fundamentals
Text Manipulation: The basics of working with input and dynamic text fields
TextManipulation.fla | TextManipulation.swf
Movie Clip Manipulation: Rotate, Movie, Fade, and otherwise manipulate movie clip instances at runtime
MovieClipManipulation.fla | MovieClipManipulation.swf
Random Number Generator: Random numbers, input/dynamic textfields, number manipulation, form validation and error handling (courtesy of Shweta Aneja)
RandomNumGenerator.fla | RandomNumGenerator.swf
Drag and Drop with Collision Detection
DragNDropCollisionBasics.fla | DragNDropCollisionBasics.swf
ActionScript for Customized Interactions
Writing Custom Functions: Teaching Flash how to perform a new task
CustomFunctions.fla | CustomFunctions.swf
Event Listeners: A more flexible way of working with user-initiated events
EventListeners.fla | EventListeners.swf
Sample Interactions & Navigation Widgets
Flash Presentation: This file recreates basic PowerPoint functionality, making it easy to create Flash-based presentations
FlashPresentation.fla | FlashPresentation.swf
"Vidget": A video interface widget (courtesy of Troy Church)
VidgetTroyChurch.fla (2.8 MB) | VidgetTroyChurch.swf (2.7 MB)
Simple Asteroids-Like Video Game: Combines many of the preceding techniques into a primitive 2-D video game
KeyboardSpaceship.fla | KeyboardSpaceship.swf
"Shape Shifter": A widget that will assist in the construction of an elegant navigation interface (courtesy of Troy Church)
ShapeShifter_Church.fla | ShapeShifter_Church.swf
Flash and External Media Content
Basic Preloader: Preload content and provide the user with a load progress bar, using components
BasicPreloader.zip (3.3 MB)
* To view, download and unzip; test using Preloader.swf and Preloader.fla; remember to simulate download in Flash environment
Loading Multiple Movies: A simple interface with preloaders
MultiloadersVillagePantry.zip (3.5 MB)
* To view, download and unzip; test using VillagePantry.swf and VillagePantry.fla; remember to simulate download in Flash environment
Loading Movies at Runtime 1: Architect Flash applications like the pros, using the basic loadMovie() method
LoadMovieBasic.zip (3 MB)
* To view, download and unzip; test using LoadMovieExample.swf and LoadMovieExample.fla
Loading Movies at Runtime 2: Architect Flash applications like the pros, using the robust and flexible MovieClipLoader object
MovieClipLoaderObject.zip (3MB)
* To view, download and unzip; test using LoadClipExample.swf and LoadClipExample.fla
Flash and External Data
Loading Variables: Getting name-value pairs in and out of Flash at runtime
LoadVars.zip
* To view, download and unzip; test using LoadVars.swf and LoadVars.fla
Connecting Flash to a Database Via ColdFusion (or PHP, ASP, etc.): Combining the talents of middleware and loadVars()
LoadVarsCFM.zip
* To view, download and unzip; see Readme file for directions on how to test
Import and Parse XML Data
XML.zip
* To view, download and unzip; test using XMLBasics.swf and XMLBasics.fla