Burst Documentation

Author: Alex Uhlmann
Last Modified: 09/23/05 19:45:47


Summary

Burst class:

- description

Burst Properties:

- innerRadius_def
- outerRadius_def
- sides_def
- movieclip
- lineThickness
- lineRGB
- lineAlpha
- fillRGB
- fillAlpha

Burst Methods:

- draw
- drawBy
- getInnerRadius
- setInnerRadius
- getOuterRadius
- setOuterRadius
- getSides
- setSides
- setRegistrationPoint
- clear
- lineStyle
- fillStyle
- gradientStyle
- getID
- toString


Burst class

version: Documentation not provided.

description:

Burst is a class for drawing bursts (rounded star shaped ovals often seen in advertising). This method also makes some fun flower shapes if you play with the input numbers. If you specify a movieclip as first parameter, the shape will be drawn inside this movieclip. If you omit the mc parameter, the class will create a new movieclip in _root.apContainer_mc.

Example 1: draw a Burst with default parameters.

			var myBurst:Burst = new Burst();
			myBurst.draw();
			
Example 2: (Example .swf) draw a Burst with custom parameters.
			var myBurst:Burst = new Burst(275,200,40,50,10);
			myBurst.lineStyle(2,0xff0000,100);
			myBurst.fillStyle(0xff0000,100);
			myBurst.draw();
			
Example 3: (Example .swf)
			var myBurst:Burst = new Burst(275,200,40,25,10);
			myBurst.lineStyle(2,0xff0000,100);
			myBurst.fillStyle(0xff0000,100);
			myBurst.draw();
			
Example 4:
			var myBurst:Burst = new Burst(275,200,30,100,10);
			myBurst.lineStyle(2,0xff0000,100);
			myBurst.fillStyle(0xff0000,100);
			myBurst.draw();
			

usage:

var myBurst:Burst = new Burst();
var myBurst:Burst = new Burst(x, y, innerRadius, outerRadius, sides);
var myBurst:Burst = new Burst(mc, x, y, innerRadius, outerRadius, sides);

parameters:


Burst Properties:

innerRadius_def

(Number)(static) default property. Radius of the indent of the curves.

outerRadius_def

(Number)(static) default property. Radius of the outermost points.

sides_def

(Number)(static) default property. Number of sides or points.

movieclip

(MovieClip)(read only) Movieclip that contains the drawing.

lineThickness

(Number) Outline thickness.

lineRGB

(Number) Outline color of the drawing as hex number.

lineAlpha

(Number) Outline transparency (alpha).

fillRGB

(Number) Fill color of the drawing.

fillAlpha

(Number) Fill transparency.


Burst Methods:

draw

description: Draws bursts.

usage:

myBurst.draw();

returns: Void.

drawBy

description: Draws the shape without clearing the movieclip.

usage:

myInstance.drawBy();

returns: Void.

getInnerRadius

description: Return the radius of the indent of the curves.

usage:

myBurst.getInnerRadius();

returns: Number of the radius of the indent of the curves.

setInnerRadius

description: Sets the radius of the indent of the curves.

usage:

myBurst.setInnerRadius(innerRadius);

parameters:

returns: Void.

getOuterRadius

description: Return the radius of the outermost points.

usage:

myBurst.getOuterRadius();

returns: Number of the radius of the outermost points.

setOuterRadius

description: Sets the radius of the outermost points.

usage:

myBurst.setOuterRadius(outerRadius);

parameters:

returns: Void.

getSides

description: Return the sides of the drawing.

usage:

myBurst.getSides();

returns: Number of sides.

setSides

description: Sets the sides of the drawing.

usage:

myBurst.setSides(sides);

parameters:

returns: Void.

setRegistrationPoint

description: Sets the registration point of the shape. Defaults to center. Top left is 0,0. The parameter object accepts either a position property with the value of "CENTER" or x and y properties of with coordinates as values of the registration point.

Example 1: Set the registration point of an ellipse to the upper left corner (0,0) instead of center.

				var myEllipse:Ellipse = new Ellipse(275,200,100,50);
				myEllipse.setRegistrationPoint( {x:0,y:0} );
				myEllipse.draw();
				

internally AnimationPackage centers all shapes with

				myInstance.setRegistrationPoint( {position:"CENTER"} );
				

usage:

myInstance.setRegistrationPoint(registrationObj);

parameters:

returns: Void.

clear

description: removes all drawings. Identical to myInstance.movieclip.clear();

usage:

myInstance.clear();

returns: Void.

lineStyle

description: define outline.

usage:

myBurst.lineStyle();
myBurst.lineStyle(lineThickness, lineRGB, lineAlpha);

parameters:

returns: Void.

fillStyle

description: define fill.

usage:

myBurst.fillStyle();
myBurst.fillStyle(fillRGB, fillAlpha);

parameters:

returns: Void.

gradientStyle

description: Same interface as MovieClip.beginGradientFill(). See manual.

usage:

myShapeComposite.gradientStyle(fillType, colors, alphas, ratios, matrix);

parameters:

returns: Void.

getID

description: returns a unique ID of the instance. Usefull for associative arrays.

usage: myInstance.getID();

returns: Number

toString

description: returns the name of the class.

usage: myInstance.toString();

returns: String




generated with AS2docGenerator beta 0.5.3