MovieScene

A graphical scene with a graph of shape and path layers which can be timeline animated over a background.

Summary
MovieSceneA graphical scene with a graph of shape and path layers which can be timeline animated over a background.
Public properties
sceneMovie scene graph holding shapes, masks and paths.
timelineMovie timeline holding tweens for all animations.
backgroundColorMovie scene background RGB color value.
Construction/destruction
MovieSceneCreate a new movie scene object.
disposeDispose of all resources used or referenced in the instance.
Utility methods
renderRender all layers in the scene
resizeHandle a stage resize event.
convertStrokeIndexToPathConvert the indexed Stroke to a Path.
Public code generation
generateCodeGenerates script code for a complete movie scene that can be compiled into a standalone application.

Public properties

scene

public var scene: SceneGraph

Movie scene graph holding shapes, masks and paths.

timeline

public var timeline: TimelineEx

Movie timeline holding tweens for all animations.

backgroundColor

public var backgroundColor: uint

Movie scene background RGB color value.

Construction/destruction

MovieScene

public function MovieScene(onSizeChange: Function,
onStrokeChange: Function,
onSelectionChange: Function)

Create a new movie scene object.

Parameters

onSizeChangeCallback function called when the scene graph changes size
onStrokeChangeCallback function called when the selected stroke changes
onSelectionChangeCallback function called when the selected stroke point changes

Callbacks

onSizeChangefunction movieSceneChangedSize(size:uint):void
onStrokeChangefunction movieSceneChangedSelectedStroke(stroke:Stroke):void
onSelectionChangefunction movieSceneChangedSelectedStrokePoint(index:int):void

dispose

public function dispose():void

Dispose of all resources used or referenced in the instance.

Utility methods

render

public function render():void

Render all layers in the scene

resize

public function resize(applyMask: Function):void

Handle a stage resize event.

Parameters

applyMaskfunction that can apply an appropriately sized mask to strokes on the scene

Callbacks

applyMaskfunction applyMaskFunction(stroke:Stroke):void

convertStrokeIndexToPath

public function convertStrokeIndexToPath(strokeIndex: int):Path

Convert the indexed Stroke to a Path.

Parameters

strokeIndexa valid stroke index in the scene graph

Returns

a Path object

See also

StrokeUtils.convertStrokeToPath

Public code generation

generateCode

public function generateCode(title: String,
codeStyle: Object):String

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

Parameters

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

Returns

an application class script

public var scene: SceneGraph
Movie scene graph holding shapes, masks and paths.
public var timeline: TimelineEx
Movie timeline holding tweens for all animations.
public var backgroundColor: uint
Movie scene background RGB color value.
public function MovieScene(onSizeChange: Function,
onStrokeChange: Function,
onSelectionChange: Function)
Create a new movie scene object.
public function dispose():void
Dispose of all resources used or referenced in the instance.
public function render():void
Render all layers in the scene
public function resize(applyMask: Function):void
Handle a stage resize event.
public function convertStrokeIndexToPath(strokeIndex: int):Path
Convert the indexed Stroke to a Path.
Defines a stroke object consisting of curves, line segments and primitive graphics objects.
The ‘Path’ class stores a collection of path segments, thus forming a path.
public function generateCode(title: String,
codeStyle: Object):String
Generates script code for a complete movie scene that can be compiled into a standalone application.
public static function convertStrokeToPath(strokePath: Stroke):Path
Converts a Stroke object defining a path into a Path object.
Close