Flash
  Home arrow Flash arrow Page 3 - 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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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 / 41
    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


    What is ActionScript? - Data Types


    (Page 3 of 5 )

    ActionScript has the following basic data types that you use frequently in your programs:

    String: A string is a sequence of characters such as letters, numbers, and punctuation marks. You enter strings in an ActionScript statement by enclosing them in single (') or double (") quotation marks.

    Ex: var name:String = "Steve";
    

    Number: The number data type is a double-precision floating-point number. The minimum value of a number object is approximately 5e-324. The maximum is approximately 1.79E+308.

    Ex: var age:Number = 24;
    

    Boolean: A Boolean value is one that is either true or false. ActionScript also converts the values true and false to 1 and 0 when appropriate. Boolean values are most often used with logical operators in ActionScript statements that make comparisons to control the flow of a script.

    Ex: var smoking:Boolean = false;

    Object: An object is a collection of properties. Each property has a name and a value. The value of a property can be any Flash data type - even the object data type. This lets you arrange objects inside each other, or nest them. To specify objects and their properties, you use the dot ( .) operator.

    Ex:

    var user:Object = new Object();
    
    user.name = "Steve";
    
    user.age = 24;
    
    user.sex = "male"
    

    MovieClip: Movie clips are symbols that can play animation in a Flash application. They are the only data type that refers to a graphic element. The MovieClip data type lets you control movie clip symbols using the methods of the MovieClip class.

    You do not use a constructor to call the methods of the MovieClip class. You can create a movie clip instance on the Stage or create an instance dynamically. Then you simply call the methods of the MovieClip class using the dot ( .) operator.

    Null: The null data type has only one value, null. This value means no value - that is, a lack of data. You can assign the null value in a variety of situations to indicate that a property or variable does not yet have a value assigned to it.

    Undefined: The undefined data type has one value, undefined, and is automatically assigned to a variable to which a value hasn't been assigned, either by your code or user interaction.

    The value undefined is automatically assigned; unlike null, you don't assign undefined to a variable or property. You use the undefined data type to check if a variable is set or defined.

    Void : The void data type has one value, void, and is used in a function definition to indicate that the function does not return a value, as shown in the following example:

    Ex:
    
    //Function with a return type Void
    
    function setItem(url:String):Void {
    
    }
    

    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?
       · Hi, Adireddy, This is with reference to your profile, we are looking for the...
     

    FLASH ARTICLES

    - 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
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT