class Rectangle { public var mc:MovieClip ; // private var x:Number ; function Rectangle (x:Number, y:Number, h:Number, w:Number) { this.mc = _root.attachMovie("square","r"+ _root.getNextHighestDepth(), _root.getNextHighestDepth() ) ; this.mc._x = x ; this.mc._y = y ; this.mc._height = h ; this.mc._width = w ; // trace("Inside constructor, x,y,h,w = " + x + " " + y + " " + h + " " + w) ; } public function setWidth(n:Number) : Void {this.mc._width = n ;} // get methods public function getWidth() : Number {return this.mc._width ;} // print method: prints out the object contents public function print() : Void { trace("Hi Mom") ; } }