ProgressiveDrawing Documentation
Author: Trevor McCauley, senocular.com
Last Modified: 4/05/08 3:16:02
Summary
ProgressiveDrawing class:
ProgressiveDrawing Properties:
ProgressiveDrawing Methods:
version: 0.9.6
description:
The ProgressiveDrawing class creates a means by which you can progressively draw your dynamically drawn Flash shapes over a period of multiple frames. The drawing API for this class matches with that of MovieClip, with the exception of a few additions, so conversion of existing drawings is simple and seemless.
Use a ProgressiveDrawing instance just as you would use a movie clip to draw lines and fills using Flash's drawing API on a movie clip. The main difference is that when these commands are used on a ProgressiveDrawing instance, they are not drawn right away. They are only drawn when the draw command is used and over a period of time, not all at once.
usage:
No usage provided
parameters:
ProgressiveDrawing Properties:
The movie clip to draw in.
Contains x and y properties representing the position of the pen for the drawing or the drawing's last position.
The current frame within drawing. This is between 1 and _totalframes.
The total number of frames in a drawing as specified in draw().
The current drawing command being issued in the onStep event. This will represent any of the drawing commands applied to the instance, "none" if not drawing. Note that not all commands will be provided in an onStep, only that which is being used at the current pen location when onStep is called.
Determines whether or not moveTo commands are tweened during drawing.
Determines whether or not the class tweens a drawing itself when draw is called.
Determines whether or not the drawing is being drawn in an autoTween.
Accuracy level for internally tetermining the length of curves created with curveTo.
addListener
description: Allows you to add listeners to the ProgressiveDrawing instance to receive events.
usage:
No usage provided
parameters:
returns: No return specified
removeListener
description: Allows you to remove listeners from the ProgressiveDrawing instance so that they will no longer receive evnets.
usage:
No usage provided
parameters:
returns: No return specified
draw
description: Initiates the drawing of a collection of lines defined in the ProgressiveDrawing instance.
usage:
No usage provided
parameters:
returns: nothing.
pause
description: Pauses the automatic drawing tween until resume is called.
usage:
No usage provided
parameters:
returns: nothing.
resume
description: Resumes the automatic drawing tween after it has been stoped as a result of pause.
usage:
No usage provided
parameters:
returns: nothing.
step
description: Forces the drawing to the next frame updating the drawing in the target movie clip. Use this if autoTween is false, otherwise it will be called automatically every frame after draw() is called. The onStep event is called after this is run. If you use step to draw a drawing at your own rate, be sure to call draw first so that you can specify the frames for that drawing and other setup operations can run.
usage:
No usage provided
parameters:
returns: nothing.
clearDrawing
description: Removes all drawing commands from the instance reseting it to the state of a new instance
usage:
No usage provided
parameters:
returns: nothing.
setEase
description: Allows you to add an ease method to the drawing behavior of the drawing. Calling this method with no arguments removes any previously added ease methods.
usage:
No usage provided
parameters:
returns: nothing.
setDrawing
description: Sets the drawings for the instance to be that of the drawing another instance passed.
usage:
No usage provided
parameters:
returns: nothing.
appendDrawing
description: Appends the drawing from the instance passed to the drawing for this instance adding it at the end of the of the drawing sequence.
usage:
No usage provided
parameters:
returns: nothing.
prependDrawing
description: Prepends the drawing from the instance passed to the drawing for this instance adding to the beginning of the of the drawing sequence.
usage:
No usage provided
parameters:
returns: nothing.
startAt
description: Drawing Command. Sets a starting location for a drawing. This works much like moveTo only this will not be tweened when tweenMoveTo is true.
usage:
No usage provided
parameters:
returns: nothing.
curveMoveTo
description: Drawing Command. Creates a curved moveTo. This works much like moveTo only in curveTo form. Use this when tweenMoveTo is true to move in a curve without drawing one.
usage:
No usage provided
parameters:
returns: nothing.
pauseFor
description: Drawing Command. Creates a pause command, adding it to the drawing. This lets you pause the drawing process
usage:
No usage provided
parameters:
returns: nothing.
lineStyle
description: Drawing Command. Creates a lineStyle command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
beginFill
description: Drawing Command. Creates a beginFill command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
beginGradientFill
description: Drawing Command. Creates a beginGradientFill command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
moveTo
description: Drawing Command. Creates a moveTo command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
lineTo
description: Drawing Command. Creates a lineTo line, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
curveTo
description: Drawing Command. Creates a curveTo curve, adding it to the drawing.
usage:
No usage provided
parameters:
returns: The ProgressiveDrawing instance.
endFill
description: Drawing Command. Creates a endFill command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.
clear
description: Drawing Command. Creates a clear command, adding it to the drawing.
usage:
No usage provided
parameters:
returns: nothing.