Home arrow Flash arrow Page 2 - What is ActionScript?
FLASH

What is ActionScript?


Have you never used ActionScript before, and want to learn? This article will help you get started. Have you used only ActionScript 1.0, and wonder what changed with version 2.0? Keep reading to find out.

Author Info:
By: Adi Reddy Mora
Rating: 4 stars4 stars4 stars4 stars4 stars / 54
March 01, 2005
TABLE OF CONTENTS:
  1. · What is ActionScript?
  2. · Curly Braces
  3. · Data Types
  4. · Variables
  5. · Debugging changes

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
What is ActionScript? - Curly Braces
(Page 2 of 5 )

ActionScript event handlers, class definitions, and functions are grouped together into blocks with curly braces ( {}).

Ex: // Class Form.as
class Form() {
}
// onRelease Event handler for button
go_btn.onRelease = function() {  
};
// Function
function getData(name:String):Void {
}
Comments:
There are two ways you can write comments in ActionScript, 
single line and multi-line comments.
Ex:
// This is a single line comment
/*
This is a multi-line comment with two lines…
second line goes here…
*/
Constants:

ActionScript contains predefined constants.

For example, the constants ENTER, BACKSPACE,SPACE, and TAB are properties of the Key object and refer to keyboard keys. To test whether the user is pressing the Enter key, you could use the following statement:

if(Key.getCode() == Key.ENTER) { 
}

Flash does not enforce constants; that is, you can't define your own constants.


blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials