com.mosesSupposes.fuse.FuseItem Class Reference

List of all members.

Detailed Description

The Fuse Kit [build1.1z3] Copyright (c) 2006 Moses Gunesch, MosesSupposes.com

Distributed under MIT Open Source License, see Fuse-Kit-License.html (in fuse package directory) Easing Equations (c) 2003 Robert Penner used by permission, see PennerEasing Visit http://www.mosessupposes.com/Fuse

Pass this class to com.mosesSupposes.fuse.ZigoEngine#register or com.mosesSupposes.fuse.ZigoEngine#simpleSetup to enable Fuse-style Object Syntax parsing capability with com.mosesSupposes.fuse.ZigoEngine#doTween. Note that registering Fuse is not required to use this feature.

ZigoEngine.doTween({ target:clip1, scale:200, ease:Strong.easeIn, time:"00:50", startAt:"01:50" });

Most methods and properties are excluded here - see class file for further documentation.
Author:
Moses Gunesch / MosesSupposes.com
Version:
2.0

Definition at line 20 of file FuseItem.as.

Public Member Functions

function getLabel ()
function hasTriggerFired ()
function getInitObj ()
function getActiveTargets (targetList:Array)
function toString ()
function evalDelay (scope:Object)
function startItem (targs:Array, scope:Object)
function stop ()
function pause (resume:Boolean)
function destroy ()
function FuseItem (id:Number, o:Object, fuseID:Number)

Static Public Member Functions

static function doTween ()

Public Attributes

var _nItemID:Number
var _nPlaying:Number = -1

Static Public Attributes

static var registryKey:String = 'fuseItem'
static var ADD_UNDERSCORES:Boolean = true

Package Functions

 if (seconds==undefined||_global.isNaN(seconds)==true) seconds=0
 if (triggerTime!=undefined)
 if (tweenSuccess==false &&(oCB!=oSimpleCB||event!=undefined||booleans!=undefined))

Package Attributes

var time:Number = delay+seconds

Private Member Functions

function onStop ()
function evtSetStart (o:Object)
function dispatchRequest (type:String, args:Array)
function _sID ()

Static Private Member Functions

static function removeInstance (id:Number)

Private Attributes

var _initObj:Object
var _nFuseID:Number
var _bStartSet:Boolean = false
var _bTrigger:Boolean = false
var _aTweens:Array
var _oElements:Object
var _aProfiles:Array
var _sImage:String
var _oTemps:Object

Static Private Attributes

static var _ZigoEngine:Object
static var _aInstances:Array


Constructor & Destructor Documentation

function com.mosesSupposes.fuse.FuseItem.FuseItem ( id:Number  ,
o:Object  ,
fuseID:Number   
)

Constructor - Attempts to parse action(s) into _oElements and _aProfiles, building the verbose string ID _sImage in the process.

Parameters:
id current index of FuseItem in parent Fuse instance
o action object or Array of action objects pushed into the Fuse for parsing
fuseID permanent unique ID of parent Fuse stored in _nFuseID

Definition at line 441 of file FuseItem.as.

References if().

Here is the call graph for this function:


Member Function Documentation

static function com.mosesSupposes.fuse.FuseItem.doTween (  )  [static]

This method needn't be called as method call is rerouted here automatically upon ZigoEngine.doTween.

Returns:
comma-delimited string listing properties successfully added to the engine.

Definition at line 116 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.getLabel (  ) 

label property queried by Fuse

Returns:
label string if FuseItem contains a label property

Definition at line 140 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.hasTriggerFired (  ) 

Fuse needs to retrieve original objects passed for Array methods that return them

Returns:
true if trigger has been fired within currently playing item

Definition at line 150 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.getInitObj (  ) 

Fuse needs to retrieve original objects passed for Array methods that return them

Returns:
original action object as passed by user

Definition at line 161 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.getActiveTargets ( targetList:Array   ) 

Fuse calls this to get additional playing or paused targets to add to defaults when getActiveTargets is called on a Fuse.

Returns:
a list of target objects or empty array

Definition at line 171 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.toString (  ) 

Definition at line 193 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.evalDelay ( scope:Object   ) 

Called by parent Fuse to retrieve simple freestanding delays (note that in certain cases FuseItems use ZigoEngine tweens to time complex delays, such as those that appear within an action group). Such non-tweened delays are centralized into the parent Fuse, which runs a setInterval timer and handles pause/resume behavior for that delay.

Parameters:
scope current default scope set in parent Fuse instance
Returns:
delay in seconds

Definition at line 201 of file FuseItem.as.

References parseClock().

Here is the call graph for this function:

function com.mosesSupposes.fuse.FuseItem.startItem ( targs:Array  ,
scope:Object   
)

Called by parent Fuse to play the FuseItem, including triggering commands, firing callbacks not associated with tweens, and starting tweens.

Parameters:
targs - an array of default targets currently set in parent Fuse instance
scope - current default scope set in parent Fuse instance
Returns:
returns successfully tweened props for doTween()

Definition at line 219 of file FuseItem.as.

References complete(), fireEvents(), and if().

Here is the call graph for this function:

function com.mosesSupposes.fuse.FuseItem.stop (  ) 

Called by parent Fuse to stop the FuseItem's tweens. If currently playing, the internal method onStop is called which clears current tween list and associated listeners.

Definition at line 274 of file FuseItem.as.

static function com.mosesSupposes.fuse.FuseItem.removeInstance ( id:Number   )  [static, private]

Definition at line 289 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.onStop (  )  [private]

Clears active elements. (Fuse event reverse-subscribed by parent Fuse)

Definition at line 300 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.evtSetStart ( o:Object   )  [private]

An event dispatched by parent Fuse to all child FuseItems to preset tween start-values.

Parameters:
o event object containing a .filter property which can specify exclusion from the call

Definition at line 318 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.pause ( resume:Boolean   ) 

Called by parent Fuse to pause or resume the FuseItem's tweens and tweened delays. During resume it is not assumed that targets and pauses are intact, each is checked and the internal tween array is trimmed if items have gone missing.

Parameters:
resume indicates whether it is a pause or resume call

Definition at line 344 of file FuseItem.as.

References onTweenEnd().

Here is the call graph for this function:

function com.mosesSupposes.fuse.FuseItem.destroy (  ) 

Called by parent Fuse to clear FuseItem instance's memory and listeners during Fuse's destroy cycle.

Definition at line 387 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem.dispatchRequest ( type:String  ,
args:Array   
) [private]

Definition at line 405 of file FuseItem.as.

function com.mosesSupposes.fuse.FuseItem._sID (  )  [private]

Concise string ID representing the parent Fuse's fixed ID and the FuseItem's current index in the Fuse, such as "Fuse#0>Item#0"

Definition at line 418 of file FuseItem.as.

com.mosesSupposes.fuse.FuseItem.if ( seconds  = =undefined||_global.isNaN(seconds)==true  )  [package, pure virtual]

com.mosesSupposes.fuse.FuseItem.if ( triggerTime!  = undefined  )  [package]

Definition at line 1029 of file FuseItem.as.

References doTimerTween().

Here is the call graph for this function:

com.mosesSupposes.fuse.FuseItem.if ( tweenSuccess  = =false && (oCB!=oSimpleCB || event!=undefined || booleans!=undefined)  )  [package]

Definition at line 1051 of file FuseItem.as.

References doTimerTween(), and fireEvents().

Here is the call graph for this function:


Member Data Documentation

var com.mosesSupposes.fuse.FuseItem.registryKey [static]

Unique identifier used by ZigoEngine.register

Definition at line 26 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem.ADD_UNDERSCORES [static]

When true, known tween properties may omit underscores (x will convert to _x, etc.)

Definition at line 31 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._nItemID

FuseItem's current index in the engine's array stack. index is 0-based like an Array. Can be set externally at any time by parent Fuse if items are spliced or reordered.

Definition at line 38 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._ZigoEngine [static, private]

An internal reference to the ZigoEngine class. Fuse + FuseItem may be used without ZigoEngine so an import statement is not used to avoid unecessary filesize when the engine is not needed.

Definition at line 44 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._initObj [private]

Original action object or array passed by user

Definition at line 50 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._nFuseID [private]

Unique ID of the FuseItem's parent Fuse instance.

Definition at line 56 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._nPlaying

Private internal play-state value, usually toggling from -1 to 1; 0 is a special flag used during the addTweens cycle.

Definition at line 62 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._bStartSet [private]

Internal memory flag indicating start properties have been preset during current play cycle.

Definition at line 68 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._bTrigger [private]

Internal flag indicating whether the FuseItem has triggered advance due to a trigger:true value in a profile.

Definition at line 74 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._aTweens [private]

Internal array queue that is progressively deleted upon tween completion to track FuseItem completion. (Public for access by Fuse.getActiveTargets)

Definition at line 80 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._oElements [private]

Storage tank for FuseItem elements that are not handled by tweens: command, label, aEvents, and delay if no tweens found. (Public for access by Fuse.currentLabel, Fuse.skipTo)

Definition at line 86 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._aProfiles [private]

Internal storage array of parsed action objects, meaning any object with tweenable elements or elements where tweening may or may not occur.

Definition at line 92 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._sImage [private]

Verbose string listing the general contents of the FuseItem, viewable by calling traceItems on the parent Fuse instance.

Definition at line 98 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._oTemps [private]

An internal collection tank for variables used across multiple parseProfile calls as the FuseItem is being instantiated. Deleted when constructor is finished.

Definition at line 104 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem._aInstances [static, private]

An internal collection of FuseItem instances generated when Fuse Object Syntax is used with ZigoEngine.doTween. These otherwise untracked instances are given an ID of -1 and are auto-deleted by the FuseItem class upon completion using removeInstance.

Definition at line 110 of file FuseItem.as.

var com.mosesSupposes.fuse.FuseItem.time [package]

Definition at line 1026 of file FuseItem.as.


Generated on Fri May 11 17:12:59 2007 for GuggaFramework by  doxygen 1.5.2