class com.Rectangle extends MovieClip { static var symbolName : String = "__Packages.com.Rectangle"; static var symbolOwner : Function = Rectangle; public var width : Number = 100; public var height : Number = 100; public var color : Number = 0; function Rectangle () { draw (); } function draw () : Void { beginFill (color); moveTo (0, 0); lineTo (width, 0); lineTo (width, height); lineTo (0, height); lineTo (0, 0); endFill (); } // associate the symbol to the class when the class is defined static var symbolLinked = Object.registerClass (symbolName, symbolOwner); }