com.mosesSupposes.fuse.ZManager 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

Documentation explains engine events. Class is private to engine but code documents methods & properties.

Engine events:
com.mosesSupposes.fuse.ZigoEngine#doTween allows for automated callbacks. In most cases, callbacks are ideal because only one targeted function-call is needed. But in situations where a tween's state-change might need to be heard by a number of listener scopes, events can be more flexible.

Events dispatched by ZigoEngine (see com.mosesSupposes.fuse.ZigoEngine#addListener for more info):

Events dispatched by individual target objects:
Subscribing to these events differs based on whether you used com.mosesSupposes.fuse.ZigoEngine#register or com.mosesSupposes.fuse.ZigoEngine#simpleSetup. In the following example you would skip the ZigoEngine.initialize step if simpleSetup was used. (Otherwise you need to initialize targets so they are able to accept listeners prior to tweening.)
var myListener:Object = {
 	onTweenStart:function(o:Object):Void {
 		trace("Tween started on:"+o.target._name+" ["+o.props.toString()+"]");
 	},
 	onTweenUpdate:function(o:Object):Void {
 		trace("Tween updating on:"+o.target._name+" ["+o.props.toString()+"]");
 	},
 	onTweenEnd:function(o:Object):Void {
 		trace("Tween completed on:"+o.target._name+" ["+o.props.toString()+"]");
 	}
 };

 // if simpleSetup was not used, initialize targets first to accept listeners
 ZigoEngine.initialize(clip1, clip2);

 clip1.addListener(myListener);
 clip2.addListener(myListener);
 ZigoEngine.doTween(clip1,"_alpha",0,2);
 ZigoEngine.doTween(clip2,"_scale",200,2);
 

The event object passed contains {target:Object, props:Array}.
This object can be crucial since ZigoEngine uses the older AsBroadcaster event model, which does not distinguish event type.

Author:
Moses Gunesch / MosesSupposes.com
Version:
2.0

Definition at line 59 of file ZManager.as.

Public Member Functions

function ZManager ()
function addTween (obj:Object, props:Array, endvals:Array, seconds:Number, ease:Function, delay:Number, callback:Object)
function removeTween (targs:Object, props:Object, noInit:Boolean)
function alterTweens (type:String, targs:Object, props:Object, pauseFlag:Boolean, suppressStartEvents:Boolean)
function getStatus (type:String, targ:Object, param:Object)
function update (force:Boolean)
function cleanUp (noInit:Boolean)
function paramsObj (targs:Object, props:Object, endvals:Object)

Public Attributes

var tweens:Object
var numTweens:Number = 0
var now:Number


Constructor & Destructor Documentation

function com.mosesSupposes.fuse.ZManager.ZManager (  ) 

Definition at line 82 of file ZManager.as.


Member Function Documentation

function com.mosesSupposes.fuse.ZManager.addTween ( obj:Object  ,
props:Array  ,
endvals:Array  ,
seconds:Number  ,
ease:Function  ,
delay:Number  ,
callback:Object   
)

Adds formatted tween objects to the engine's internal tween list for a single target

Parameters:
obj tween target object
props list of properties to tween
endvals corresponding list of tween end-values
seconds duration of tween in seconds
ease easing function for tween
delay delay in seconds before performing tween
callback pre-validated and formatted callback object
Returns:
string comma-delimited list of properties actually added

Definition at line 100 of file ZManager.as.

References if(), onTweenEnd(), and onTweenInterrupt().

Here is the call graph for this function:

function com.mosesSupposes.fuse.ZManager.removeTween ( targs:Object  ,
props:Object  ,
noInit:Boolean   
)

Internal removal of currently active tweens used by ZigoEngine.removeTween.

Parameters:
targs One or more targets or the keyword 'ALL', null is rejected.
props One or more props in any valid format, no value indicates all.
noInit Internal flag used during addTween cycle to suppress engine reboot.

Definition at line 346 of file ZManager.as.

References onTweenInterrupt().

Here is the call graph for this function:

function com.mosesSupposes.fuse.ZManager.alterTweens ( type:String  ,
targs:Object  ,
props:Object  ,
pauseFlag:Boolean  ,
suppressStartEvents:Boolean   
)

Internal method used by ZigoEngine.pauseTween, unpauseTween, rewTween, ffTween methods.

Parameters:
type string cuing which action is being requested by the engine class.
targs one or more targets or the keyword 'ALL', null is rejected.
props one or more props in any valid format, no value indicates all.
pauseFlag whether to pause after rewind.
suppressStartEvents if true onTweenStart and startfunc callbacks are not refired upon rewind; if false or undefined the events are refired.

Definition at line 402 of file ZManager.as.

References if().

Here is the call graph for this function:

function com.mosesSupposes.fuse.ZManager.getStatus ( type:String  ,
targ:Object  ,
param:Object   
)

Internal method used by ZigoEngine.isTweenPaused, isTweenLocked, isTweening methods.

Parameters:
type string cuing which status is being requested by the engine class
targ a target to query for requested status
param one or more props in any valid format, no value indicates all
Returns:
dynamic value

Definition at line 465 of file ZManager.as.

function com.mosesSupposes.fuse.ZManager.update ( force:Boolean   ) 

The primary on-pulse animation updating and event dispatching method.

Parameters:
force - used in rewTween to force paused tweens to update

Definition at line 500 of file ZManager.as.

References if(), and onTweenInterrupt().

Here is the call graph for this function:

function com.mosesSupposes.fuse.ZManager.cleanUp ( noInit:Boolean   ) 

Clean up tweens when targets go missing, this method helps reboot the manager when 're-testing' a published swf

Parameters:
noInit prevents engine deinit call during addTween

Definition at line 669 of file ZManager.as.

function com.mosesSupposes.fuse.ZManager.paramsObj ( targs:Object  ,
props:Object  ,
endvals:Object   
)

helper for alterTweens, removeTween, and ZigoEngine.doTween to process & consolidate properties.

Parameters:
targs targets as passed by user
props props as passed by user
endVals end-values as passed to ZigoEngine.doTween
Returns:
a custom object formatted for internal use

Definition at line 697 of file ZManager.as.


Member Data Documentation

var com.mosesSupposes.fuse.ZManager.tweens

Internal 'tweenlist' object that stores all currently running tweens.

Definition at line 65 of file ZManager.as.

var com.mosesSupposes.fuse.ZManager.numTweens

Couples with the tweens object to form a hash.

Definition at line 71 of file ZManager.as.

var com.mosesSupposes.fuse.ZManager.now

Internal storage of the current time, amalgamated per addTween and update cycle.

Definition at line 77 of file ZManager.as.


Generated on Fri May 11 17:13:01 2007 for GuggaFramework by  doxygen 1.5.2