CARVIEW |
A–C
D–H
I–Z
Developer services
Project centers
Community resources
- Flex cookbook (share code)
- Adobe AIR cookbook (share code)
- CSS Advisor (browser bug fixes)
- Exchanges (share components)
- Adobe Labs
- Adobe Open Source
- Forums
- RSS feeds
- Bug base
- User group search
- About user groups
- Adobe Community Experts (ACE)
- Developer events
Product documentation
Downloads
Samples
Training and books
- Online training
- Classroom training
- Certification
- Adobe Developer Library
- Adobe Press
- Safari Books Online
Newsletters
Blogs
- MXNA (blog aggregator)
- Adobe blogs
Archives
ADC program
Additional resources
Flash Developer Center
Flash ActionScript 3.0 samples
These ActionScript 3.0 samples demonstrate various features common in Flash development. Some samples are complete applications, while others simply introduce a concept that you can use to build your own apps. Use these files to investigate how each of the samples was constructed. Explore the graphics and timelines in the FLA files, and explore the ActionScript code in the associated AS files.
Samples are rated Beginner, Intermediate, and Advanced. Intermediate developers and people with prior experience in ActionScript 2.0 will be interested in looking at the code to see how it works in ActionScript 3.0.
Get the source FLA files for all samples:
- flash_as3_samples.zip (ZIP, 8.3 MB)
You can also download individual source files on each sample's detail page below.
Note: You may reuse these files as you want, but they are not officially supported as part of the product. Technical support will not be able to answer any questions about these files.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
The samples and related concepts are grouped into the following categories:
Drawing samples
ActionScript 3.0 has access to most aspects of the Flash environment. The first step to understanding how to work with code in Flash is to understand how it relates to the visual environment. Flash projects are composed of timelines (movie clips or sprites) that act as containers for content and code. In ActionScript 3.0, Flash timelines are display object containers and the visual elements within them are called display objects. The following samples explore timelines, coordinates, and Flash's built-in drawing and color controls:
User level: Beginner
Coordinate space, radians, and degrees
Explore timeline coordinates and the distance and angle between points.
User level: Beginner
Movie clip nesting
Explore the effects of timeline nesting and graphic placement within
timelines.
User level: Intermediate
Drawing API
Explore the built-in drawing tools available in sprites and movie clips.
Media samples
Sounds, images, and text can be used to enhance the content in your project. Flash has the ability to use external or embedded media. ActionScript 3.0 has greater control over media usage and media related events. The following samples highlight how to use text, images, and sound in your Flash project:
User level: Intermediate
Dynamic text
Explore a simple paycheck calculator that uses Flash text fields and
component text inputs to display dynamic text.
User level: Intermediate
Image masking
Explore three types of masking effects used over bitmap images.
User level: Intermediate
Sound loading
Explore a sample that loads sounds and provides a basic set of custom
controls.
User level: Intermediate to advanced
Sound channels
Explore more in-depth sound controls in this mixing board sample.
Component sample
One of the strengths of ActionScript is its ability to create organized, reusable components. Flash CS3 Professional ships with a set of built-in user interface components for ActionScript 2.0 and ActionScript 3.0. You can also build your own custom components. The following sample shows built-in and custom components in action:
Time samples
There are many occasions when you need to know the viewer's local time and date or the elapsed time in a movie (SWF file). Displaying the date and time in a user interface or the elapsed time during a game or interaction is an easy way to generate interest and a sense of change. The following samples show two approaches for handling time:
Interactivity samples
Flash is a great tool for building games, learning interactions, and interactive environments. ActionScript 3.0 expands the options available to developers, allowing for creative solutions to old design problems. You can use the built-in components or build custom controls to create interactive elements in your movie. The following samples create animations through a series of interactive controls:
User level: Intermediate
Button-controlled movement
Explore an interactive screen where an animation is controlled by buttons.
User level: Intermediate
Slider-controlled movement
Explore an interactive screen where an animation is controlled by sliders.
User level: Intermediate
Joystick-controlled movement
Explore an interactive screen where an animation is controlled by a virtual
joystick.
User level: Intermediate
Keyboard-controlled movement
Explore an interactive screen where an animation is controlled by keyboard
presses.
User level: Intermediate
Click-controlled movement
Explore an interactive screen where an animation is controlled by click
location.
User level: Intermediate
Object thrust
Explore an interactive screen where keyboard controls change the thrust
of an animation.
User level: Intermediate
Scrolling background
Explore an interactive screen where sliders control a dynamically generated
sky background.
Game samples
Flash is a popular medium for online game development due to its history in animation, strength with graphics, and its integrated programming language. The following samples combine previous concepts to form more complex game applications:
User level: Intermediate
Maze
Explore a maze game where arrow keystrokes control player movement through
the boundaries of a maze pattern.
User level: Advanced
Amoebas
Explore a starship game where obstacles and laser fire are dynamically
generated through building game levels.
Submit your feedback about the Developer Center.
Next Steps
- Flash Developer Center Home
- Flash tutorials
- 3D/Animation
- Accessibility
- ActionScript
- Active content
- Adobe AIR
- Components
- Cross-product integration
- Data integration
- Drawing
- Flash Player detection
- Getting started
- Graphic effects
- JavaScript API
- Learning guides
- Migrating
- Mobile and devices
- RIAs
- Security
- Templates
- Testing/usability
- Video
- Web services
- Related resources
- Adobe AIR Developer Center for Flash
- Flash Design Center
- Flash support center
- Flash support forum
- Flash blogs
- Flash events
- Flash online events
- Flash tenth anniversary
- Adobe Labs
- Adobe Community Experts
- ADC Home
- Online Privacy Policy
- Terms of Use
- Contact us
- Accessibility
- Report piracy
- Permissions and trademarks
- Send feedback
- Adobe.com Home
Copyright © 2008 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-08-2008).
Search powered by Powered by Google
