Wednesday, March 17, 2010

1st post on ActionScript

 Before you jump into learning ActionScipt ,


I suggest you to take a look and try different animation techniques in flash ( http://www.smartwebby.com/Flash/flash_animations.asp#motion_tween ). [Time req . = hardly 20-30 min ]

Now we will jump directly into Actionscript,

Variable declaration in ActionScript :

Syntax :

var name:type = value;

The three parts of variable are :
1. name = it's name .
2. type = it's data type ( int , number , Boolean ) .
3. value = The value stored in the variable . 

Data type is same as the class and the object . 
A class is the definition of data type .
An object is the instance of a class . 

Example :

var count:int = 10 ;
here , count is the object of integer class .

ActionScript is an object oriented programming language . It's Class includes three things ,

1. Properties : These are the variables used in an object .  
2. Methods : They are same as the functions in any other language . These are the actions a object can perform .
3. Events : The things that Actionscript can respond to such as mouse click , button press. 


0 comments: