Flash is a software for creating high end web application. Action Script is a Object Oriented Programming Language packed with Flash. Classes are the main feature of any OOP language. A class contains data(properties) and methods(behaviours). After defining a class we create an object of that class. This oject hass all the properties in the class. The defined object is said to be of that class's data type. In action Script class can be built in or custom. There are 65 built in classes in action script. In the example below employee is a class. This class contains the variables age, name and salary and a class function info. The variables age, name and salary are said to be the properties of the class employee and info is the method or behaviour in the class.
class employee
{
public var age:number;
public var name:string;
private var salary:number;
public function info():string
{
// method
}
}
No comments:
Post a Comment