MovieCodeGenerator

A encapsulation of code generation for a graphical animated scene.

Summary
MovieCodeGeneratorA encapsulation of code generation for a graphical animated scene.
Public code generation
generateCodeGenerates script code for a complete movie scene that can be compiled into a standalone application.
Private movie scene code generation
generateMembersCodeGenerate AS3 code for data members holding stroke sprite and shape objects.
generateMemberCodeGenerate AS3 code for a data member holding a stroke sprite and shape object.
generateStrokesCodeGenerate AS3 code for all methods creating stroke shapes and paths in the movie scene.
generateStrokeCodeGenerate AS3 code for a method to create a stroke sprite, shape or path object.
generateSceneGraphCodeGenerate AS3 code for a method to create all stroke shapes and masks.
generateSceneNodesCodeGenerate AS3 code for a snippet to create strokes, their relationships and masks.
generateSceneNodeCodeGenerate AS3 code for a snippet to create a stroke, add to its parent and as a mask if appropriate.
Private animation code generation
generateAnimationCodeGenerate AS3 code for a method to add a series of tweens to a timeline.
generateTransformCodeGenerate AS3 code for initialization of matrix and color transforms.
generateTransitionTypeGenerate a symbolic transition constant from a pseudo-enumeration transition string.

Public code generation

generateCode

public static function generateCode(movie: MovieScene,
title: String,
codeStyle: Object):String

Generates script code for a complete movie scene that can be compiled into a standalone application.

A static scene does not require any external libraries.  An animated scene requires the boostworthy animation library and the TweenEx class if extended transform or filter properties are animated.

Parameters

moviemovie scene object
titleversion decorated identification of the generating application
codeStyledynamic object with properties describing the desired code style

Returns

an application class script

Private movie scene code generation

generateMembersCode

private static function generateMembersCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String

Generate AS3 code for data members holding stroke sprite and shape objects.

Parameters

scenescene graph object
titleversion decorated identification of the generating application
indentstring with spaces to indent each line of code
codeStyledynamic object with properties describing the desired code style

Returns

an AS3 script snippet

generateMemberCode

private static function generateMemberCode(nodeStroke: Stroke,
arg: Object):String

Generate AS3 code for a data member holding a stroke sprite and shape object.

Parameters

nodeStrokethe stroke to generate code for
argdynamic object with a title, indent and codeStyle property

Returns

an AS3 script snippet

See also

generateMembersCode

generateStrokesCode

private static function generateStrokesCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String

Generate AS3 code for all methods creating stroke shapes and paths in the movie scene.

Parameters

scenescene graph object
titleversion decorated identification of the generating application
indentstring with spaces to indent each line of code
codeStyledynamic object with properties describing the desired code style

Returns

an AS3 script snippet

generateStrokeCode

private static function generateStrokeCode(nodeStroke: Stroke,
arg: Object):String

Generate AS3 code for a method to create a stroke sprite, shape or path object.

Parameters

nodeStrokethe stroke to generate code for
argdynamic object with a title, indent and codeStyle property

Returns

an AS3 script snippet

See also

generateStrokesCode

generateSceneGraphCode

private static function generateSceneGraphCode(scene: SceneGraph,
title: String,
methodName: String,
className: String,
indent: String,
codeStyle: Object):String

Generate AS3 code for a method to create all stroke shapes and masks.

Parameters

scenescene graph object
titleversion decorated identification of the generating application
methodNamename of the method to be generated
classNamename of the class being generated
indentstring with spaces to indent each line of code
codeStyledynamic object with properties describing the desired code style

Returns

an AS3 script snippet

generateSceneNodesCode

private static function generateSceneNodesCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String

Generate AS3 code for a snippet to create strokes, their relationships and masks.

Parameters

scenescene graph object
titleversion decorated identification of the generating application
indentstring with spaces to indent each line of code
codeStyledynamic object with properties describing the desired code style

Returns

an AS3 script snippet

generateSceneNodeCode

private static function generateSceneNodeCode(nodeStroke: Stroke,
arg: Object):String

Generate AS3 code for a snippet to create a stroke, add to its parent and as a mask if appropriate.

Parameters

nodeStrokethe stroke to generate code for
argdynamic object with a title, indent and codeStyle property

Returns

an AS3 script snippet

See also

generateSceneNodesCode

Private animation code generation

generateAnimationCode

private static function generateAnimationCode(timeline: TimelineEx,
title: String,
methodName: String,
timelineName: String,
className: String,
indent: String,
codeStyle: Object):String

Generate AS3 code for a method to add a series of tweens to a timeline.

Parameters

timelineanimation timeline object
titleversion decorated identification of the generating application
methodNamename of the method to be generated
timelineNamename of the timeline to add tweens to
classNamename of the class being generated
indentstring with spaces to indent each line of code
codeStyledynamic object with properties describing the desired code style

Returns

an AS3 script snippet

generateTransformCode

private static function generateTransformCode(tweenEx: TweenExInterface,
objectName: String,
indent: String):String

Generate AS3 code for initialization of matrix and color transforms.

Parameters

tweenExextended tween which may require a transform object
objectNamename of the object being tweened
indentstring with spaces to indent each line of code

Returns

an AS3 script snippet

generateTransitionType

private static function generateTransitionType(transition: String):String

Generate a symbolic transition constant from a pseudo-enumeration transition string.

Parameters

transitiona string containing a transition constant

Returns

A string with the symbolic equivalent

public static function generateCode(movie: MovieScene,
title: String,
codeStyle: Object):String
Generates script code for a complete movie scene that can be compiled into a standalone application.
private static function generateMembersCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String
Generate AS3 code for data members holding stroke sprite and shape objects.
private static function generateMemberCode(nodeStroke: Stroke,
arg: Object):String
Generate AS3 code for a data member holding a stroke sprite and shape object.
private static function generateStrokesCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String
Generate AS3 code for all methods creating stroke shapes and paths in the movie scene.
private static function generateStrokeCode(nodeStroke: Stroke,
arg: Object):String
Generate AS3 code for a method to create a stroke sprite, shape or path object.
private static function generateSceneGraphCode(scene: SceneGraph,
title: String,
methodName: String,
className: String,
indent: String,
codeStyle: Object):String
Generate AS3 code for a method to create all stroke shapes and masks.
private static function generateSceneNodesCode(scene: SceneGraph,
title: String,
indent: String,
codeStyle: Object):String
Generate AS3 code for a snippet to create strokes, their relationships and masks.
private static function generateSceneNodeCode(nodeStroke: Stroke,
arg: Object):String
Generate AS3 code for a snippet to create a stroke, add to its parent and as a mask if appropriate.
private static function generateAnimationCode(timeline: TimelineEx,
title: String,
methodName: String,
timelineName: String,
className: String,
indent: String,
codeStyle: Object):String
Generate AS3 code for a method to add a series of tweens to a timeline.
private static function generateTransformCode(tweenEx: TweenExInterface,
objectName: String,
indent: String):String
Generate AS3 code for initialization of matrix and color transforms.
private static function generateTransitionType(transition: String):String
Generate a symbolic transition constant from a pseudo-enumeration transition string.
Extends the Tween class with dispose and extended properties on objects.
Close