Sunday, November 7, 2010

Flash - ActionScript - the Actions Panel

The Actions Panel is where you write all your code.

Ways to open the actions panel:
1. Windows -> Actions
2. select a keyframe on the timeline and click the "ActionScript icon" on the top right of the Properties inspector.
3. right-click/ctrl-click on any keyframe and select Actions.
4. select keyframe on the timeline and press "F9"

Flash - ActionScript - automatic help from flash tools

@ color codes:
+ words that have specific meanings in ActionScript, such as keywords and statements, appear in blue as you type them in the Actions panel.
+words that are not reserved in ActionScript, such as variable names, are in black.
+Strings appear in green.
+Comments (which are ignored by ActionScript), appear in gray.

@click the "check syntax icon" to make the tool check the syntax of your script

@click the "auto format icon" to format the script according to conventions, so that your script will be easier to read

**reference: "flash cs5 classroom in a book"

Flash - ActionScript - Syntax

scripting syntax

* the dot operator (.) provides a way to access the properties and methods of an object. Type the instance name, followed by a dot, and then the name of the property or method. Think of the dot as a way to separate objects, methods and properties.

* whenever you are entering a string or the name of a file, use quotation marks

--reference: "adobe cs5 flash classroom in a book"

Saturday, November 6, 2010

Flash - ActionScript

Adobe Flash CS5 uses Action Script 3.0, which is a robust scripting language, that can be used to extend the functionality of Flash.

ActionScript, which is similar to JavaScript, allows you to add more interactivity to Flash animations.

You can use ActionScript to attach behaviors to buttons.

You can also use ActionScript to perform simple tasks like stopping an animation..


**reference: "Adobe Flash CS5 Classroom in a Book"

Flash - Naming Instances

Naming instances is a critical step in creating interactive Flash projects.

Naming Rules:
1. Do not use spaces or special punctuation. Underscores are OK.
2. Do not begin a name with a number.
3. Do not use any word that is reserved for a flash actionScript command.

reference: "Classroom in a Book".

Friday, November 5, 2010

Flash - four states of a button English/中文

  Up       Over      Down          Hit

一般      滑入       按下       感应区

Flash - Notes - Chap.6 Classroom in a book

In Flash, you use ActionScript to achieve most interactivity.

ActionScript provides the instructions that tell each button what to do when a user click on one of them.

In chapter6, you will learn to create a "non-linear navigation", where a movie does not neccessarily have to directly play from beginning to end.--> Action script can tell the Flash playhead to jump around and go to different frames of the Timeline based on which button the user clicks. Different frames on the timeline contain different content. The user doesnt actually know that the playhead is jumping around the tmeline: the user just sees (or hears) different content appear as the buttons are clicked on the Stage.

.....excerpted from "Classroom in a Book", Chapter6