| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
DrawShapes |
|
|
| Method | Defined By |
|---|---|
|
DrawShapes()
Creates a new instance of the DrawShapes class. |
DrawShapes |
|
doDrawCircleFill(size:Number, bgColor:uint = 0xCCCCCC, borderColor:uint = 0x000000, borderSize:Number = 0)
Draw a circle with fillcolor. |
DrawShapes |
|
doDrawCircle(size:Number, borderColor:uint = 0x000000, borderSize:Number = 0)
Draw a circle with fillcolor. |
DrawShapes |
|
doDrawRoundRectFill(_width:int, _height:int, cornerRadiusW:int=0, cornerRadiusH:int=0, bgColor:uint = 0xCCCCCC, borderColor:uint = 0x000000, borderSize:Number)
Draw a rectangle with fillcolor. Corners can be round. |
DrawShapes |
|
doDrawRoundRect(_width:int, _height:int, cornerRadiusW:int=0, cornerRadiusH:int=0, borderColor:uint = 0x000000, borderSize:Number)
Draw a rectangle. Corners can be round. |
DrawShapes |
| Event | Defined By |
|---|---|
|
All events of the Sprite class |
Sprite |
| Constructor Detail |
|---|
|
DrawShapes () Constructor
public function DrawShapes() |
| Intializes a new DrawShapes instance. |
| Method Detail |
|---|
|
doDrawCircleFill() method
Description here...... |
Parameters
|
|
doDrawCircle() method
Description here...... |
Parameters
|
|
doDrawRoundRectFill() method
Description here...... |
Parameters
|
|
doDrawRoundRect() method
Description here...... |
Parameters
|
| Examples |
|---|
Create a new fla file and name it DrawShapes.fla. Set the Publish settings to Adobe Air. Place the fla in the same folder as the biz folder. Then create an Actionscript file, name it Drawshapes.as and place this script.
package
{
import flash.display.Sprite;
import biz.flashscript.displayobjects.DrawShapes;
public class Drawshapes extends Sprite
{
public function Drawshapes ():void
{
var _object:DrawShapes = new DrawShapes();
_object.doDrawCircleFill(100);
addChild(_object);
//
var _object2:DrawShapes = new DrawShapes();
_object2.doDrawCircle(100);
_object2.x = 105;
addChild(_object2);
//
var _object3:DrawShapes = new DrawShapes();
_object3.doDrawRoundRectFill(100, 100, 10, 10);
_object3.x = 210;
addChild(_object3);
//
var _object4:DrawShapes = new DrawShapes();
_object4.doDrawRoundRect(100, 100, 10, 10);
_object4.x = 315;
addChild(_object4);
}
}
}
|