Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 190

Programming actionscript 3.0
Table of Contents

Advertisement

The GeometricSprite class and its subclasses
Each display object the user can add to the canvas is an instance of one of the following
subclasses of the GeometricSprite class:
CircleSprite
SquareSprite
TriangleSprite
The GeometricSprite class extends the flash.display.Sprite class:
public class GeometricSprite extends Sprite
The GeometricSprite class includes a number of properties common to all GeometricSprite
objects. These are set in the constructor function based on parameters passed to the function.
For example:
this.size = size;
this.lineColor = lColor;
this.fillColor = fColor;
The
geometricShape
interface, which defines the mathematical properties, but not the visual properties, of the
shape. The classes that implement the IGeometricShape interface are defined in the example
application for Chapter 4 (see
The GeometricSprite class defines the
override definitions in each subclass of GeometricSprite. For more information, see the
"Adding display objects to the canvas"
The GeometricSprite class also provides the following methods:
The
onMouseDown()
dragging display objects" on page
The
showSelected()
and dragging display objects" on page
190
Display Programming
property of the GeometricSprite class defines an IGeometricShape
"Example: GeometricShapes" on page
drawShape()
section, which follows.
and
onMouseUp()
192.
and
hideSelected()
192.
method, which is further refined in the
methods, which are described in
methods, which are described in
148).
"Clicking and
"Clicking

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents