Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 1. Using Flash and ActionScript ... > Basic ActionScript Concepts - Pg. 20

20 Chapter 1: Using Flash and ActionScript 3.0 This basically is an extension of the "smallest-step approach." Break your programming tasks into small steps. Create the code for each step. Then, test each step. Basic ActionScript Concepts Let's take a look at the most basic programming syntax in ActionScript 3.0. If you are new to ActionScript but have been using another programming language, this is a quick way to see how ActionScript works. In case you have used ActionScript or ActionScript 2.0 before, I point out some places where ActionScript 3.0 differs. Creating and Using Variables Storing values in ActionScript 3.0 can be done with a simple assignment statement. However, you need to declare a variable the first time you use it. You can do this by placing var before the first use of the variable: var myValue = 3; Alternatively, you could declare the variable first and use it later: