Flash
  Home arrow Flash arrow Page 2 - What is ActionScript?
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

What is ActionScript?
By: Adi Reddy Mora
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 29
    2005-03-01

    Table of Contents:
  • What is ActionScript?
  • Curly Braces
  • Data Types
  • Variables
  • Debugging changes

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    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.

    More Flash Articles
    More By Adi Reddy Mora


       · I am Adi Reddy Mora, the author of this article from India. This is my 2nd article...
       · HiVery nice & brief information about action script for a beginner. Thanks for...
       · are you saying that with action script code i can make flash objects?
     

    FLASH ARTICLES

    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications
    - ActionScript in Flex Applications
    - A Closer Look at Apollo`s File System API
    - Using the File System API
    - ActionScript 101
    - Flash Buttons
    - Advanced Flash Animation
    - Creating Your First Animated Movie with Flas...
    - Flash: Building Blocks
    - Building Preloaders
    - Fun Things to Do with Movie Clips in Flash MX
    - Referencing Movie Clips in Flash MX






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway