Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 189

Programming actionscript 3.0
Table of Contents

Advertisement

AS the following example shows, the
DrawingCanvas object, which were passed as arguments to the constructor function:
this.lineColor = lineColor;
this.fillColor = fillColor;
this.width = 500;
this.height = 200;
The
method then calls the
initCanvas()
using the DrawingCanvas class's
from the Shape class.
this.graphics.clear();
this.graphics.lineStyle(1.0, this.lineColor, 1.0);
this.graphics.beginFill(this.fillColor, 1.0);
this.graphics.drawRect(bounds.left - 1,
bounds.top - 1,
bounds.width + 2,
bounds.height + 2);
this.graphics.endFill();
The following additional methods of the DrawingCanvas class are invoked based on user
interactions with the application:
The
addShape()
display objects to the canvas" on page
The
moveToBack()
described in
"Rearranging display object layering" on page
The
onMouseUp()
on page
192.
initCanvas()
graphics
and
describeChildren()
191.
,
,
moveDown()
moveToFront()
method, which is described in
method defines various properties of the
method, which draws the canvas
drawBounds()
property. The
graphics
methods, which are described in
, and
moveUp()
194.
"Clicking and dragging display objects"
property is inherited
"Adding
methods, which are
Example: SpriteArranger
189

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents