ActionScript has been bumped-up a major revision to version 2. Here’s what I could find on Macromedia’s site about ActionScript 2.0. From the New Features page:
Take advantage of ActionScript 2.0’s more robust programming model and object-oriented programming support, which makes it more familiar to experienced Java programmers.
With object-oriented programming support and a more robust, European Computer Manufacturers Association (ECMA) standards-compliant programming model, ActionScript 2.0 is more familiar to experienced Java programmers. Compile ActionScript 2.0 code to ActionScript 1.0 for playback on earlier versions of the Macromedia Flash Player.
/** * Accessor to assign width. This version both assigns the new width property * value and redraws the box based on the new width. */ publicfunctionsetWidth(w:Number):Void { width = w; draw(); }
/** * Accessor to assign height. This version both assigns the new height property * value and redraws the box based on the new height. */ publicfunctionsetHeight(h:Number):Void { height = h; draw(); }
/** * Accessor to retrieve x. For convenience, the x and y coordinates * are stored directly on the container movie clip. If numeric accuracy * were a concern, we'd store x as a Box property separately so * that it wouldn't be rounded by the MovieClip class. */ publicfunctiongetX():Number { return container_mc._x; }
/** * Accessor to retrieve y. */ publicfunctiongetY():Number { return container_mc._y; }
/** * Accessor to assign y. */ publicfunctionsetY(y:Number):Void { container_mc._y = y; }
/** * Displays the Box instance on screen. Uses the MovieClip drawing methods to * draw lines in container_mc. For more information, see * ActionScript for Flash MX: The Definitive Guide. */ publicfunctiondraw():Void { // Clear the previous box rendering. container_mc.clear(); // Use a 1 point black line. container_mc.lineStyle(1, 0x000000); // Position the drawing pen. container_mc.moveTo(0, 0); // Start a white fill. container_mc.beginFill(0xFFFFFF, 100); // Draw the border of the box. container_mc.lineTo(width, 0); container_mc.lineTo(width, height); container_mc.lineTo(0, height); container_mc.lineTo(0, 0); // Formally stop filling the shape. container_mc.endFill(); } }