Projects

Intro to Flash Navigation

Example 1 : Example 2 : Example 3 : Example 4

Key Concepts

Symbols

Graphics

Buttons

Movie Clips

Instances & Reusability

Extensibility

Movies should be built in such a way that components can be easily modified and updated. Ideally they should also be modular and portable between movies. For example, a slider widget could be reused to control any number of things, from font-size to scrolling to tint color. The bits of script that enable the slider to control these things should be easily moved from project to project, so that redevelopment is not necessary.

Events

Actionscript is event-driven. An event must occur for actionscript to be executed. There are three types of events:

Timeline events are triggered by the playhead entering a certain frame.

User triggered events are generally detected by buttons. Examples include: clicks, rollovers, rollouts, keypresses,

Clip events are triggered by movie clip symbols. Examples incluse: load, unload, enterframe, loading external data

Actionscript triggered by timeline events is attached to frames. Select a frame in the timeline, and type your actionscript into the actionscript window.

User events and clip events require that actionscript be attached to symbol instances with event handlers. Generally, buttons handle all user-triggered events. Select the instance of the button on the stage, and add the actionscript with the appropriate event-handler block.

on (release) {
gotoAndStop(1);
}

Movie clip events are handled similarly: select the instance of the movieclip on the stage and enter the code in the actionscript window.

onClipEvent(load) {
gotoAndStop(3);
}

Paths to Objects

Instances of movieclips are basically objects with properties, methods, and variables. They can be accessed via relative or absolute paths using dot notation. For example, the following absolute paths:

_root is the name of the main timeline. _parent refers to the movieclip containing the current clip. Most movieclip properties have an underscore at the beginning (_x, _y, _currentframe, etc.).

Project

Create a navigable movie like the ones we're discussing today. The content can reside on the main timeline or on a movieclip's timeline.

Examples

Download the example .fla's

Recently Played on iTunes

  1. “Abierto”
    Soul Food Taqueria
    Tommy Guerrero
    10/06/08 16:28
  2. “Hit Or Miss”
    Punk Rock Days: The Best Of DBL
    Down By Law
    10/06/08 16:25
  3. “Start!”
    Compact Snap
    The Jam
    10/06/08 16:22

Last 100 Songs >