A basic ActionScript 3 Object-Oriented Programming Reference:
The Colour.as code below illustrates one of the most basic implementations of an ActionScript 3.0 class. The class holds just a single method and property.
public class Colour
public var color:String = "red";
public function Colour()
trace("new "+ color +" created");
Test the code on the first keyframe on the main Timeline:
var firstBrick:Brick = new Brick();