Previous | Next | Frames (Show Nav) | No Frames |
Summary: Field | Property | Constructor | Method | Detail: Field | Property | Constructor | Method |
Array | +--com.mosesSupposes.fuse.Fuse
Field Summary |
|
public static |
AUTOCLEAR: Boolean = false |
Class default: whether Fuse instances are automatically
destroyed after playing once unless otherwise specified by instance-level autoClear. |
|
public static |
AUTOSTOP: Boolean = true |
Class default: whether Fuse instances stop when
a tween is interrupted, or is destroyed if autoClear is turned
on, unless otherwise specified by instance-level autoStop. |
|
public static |
OUTPUT_LEVEL: Number = 1 |
Class default: Controls how much feedback Fuse
outputs, helpful for debugging. |
|
public static |
VERSION: String = FuseKitCommon.VERSION |
Class default: Enables kit version to be retrieved
at runtime or when reviewing a decompiled swf. |
|
Property Summary |
|
public |
autoClear: Boolean |
Instance default: Fuse instance is automatically
destroyed after playing once. |
|
public |
autoStop: Boolean |
Instance default: Fuse instance stops when any
of its running tweens are interrupted, or is destroyed if autoClear is
turned on. |
|
public |
currentIndex: Number (read-only) |
Retrieves the current play-index of a Fuse instance. |
|
public |
currentLabel: String (read-only) |
Retrieves the currently playing action's label,
if defined. |
|
public |
duration: Number |
Instance default: duration value in seconds for
any action that does not specify one. |
|
public |
easing: Object |
Instance default: easing value for any action that
does not specify one. |
|
public |
id: Number (read-only) |
Instance default: an auto-assigned numerical reference |
|
public |
label: String |
Instance default: Convenience, allows you to name
any Fuse. |
|
public |
scope: Object |
Instance default: scope for all functions run from
a Fuse if left unspecified within the action. |
|
public |
state: String (read-only) |
Retrieves a Fuse instance's current play-state
string. |
|
public |
target: Object (read, write) |
Instance default: Sets one or more animation targets
that will be used for any actions that don't specify their own. |
|
Constructor |
|
Fuse ( action: Object) | |
Fuse extends Array to enable sequence-building & management
using familiar methods like push() . |
|
Method Summary |
|
public static |
addCommand ( commandOrScope: Object, indexOrFunc: Object, argument: Object ): Void |
Simple Syntax: Multi-purpose method to add an inline
Fuse command, delay, or function-call to the open Fuse. |
|
public |
addEventListener ( event: String, handler: Object ): Void |
Add a listener for a particular event |
|
public |
addTarget ( t: Object ): Void |
Adds to current default target list. |
|
public |
clone ( ): Fuse |
Returns a copy of Fuse as a new Fuse instance. |
|
public static |
close ( ): Void |
Simple Syntax: Completes the Fuse generated by open. |
|
public static |
closeAndStart ( setStart: Object ): Void |
Simple Syntax: Close the open Fuse instance and
start it playing. |
|
public static |
closeGroup ( ): Void |
Simple Syntax: Closes an action group started by openGroup. |
|
public |
destroy ( ): Void |
Deletes all variables and properties in the Fuse
instance. |
|
public |
fastForward ( resumeAtIndexOrLabel: Object ): Void |
Fast-forwards animations in some or all remaining
actions. |
|
public |
getActiveTargets ( includeDefaults: Boolean ): Array |
Gets both the default target list and any targets
in the action currently being played. |
|
public static |
getInstance ( idOrLabel: Object ): Fuse |
Instance-management: Gets a Fuse instance by its
id or label |
|
public static |
getInstances ( stateFilter: String, targets: Object ): Array |
Instance-management: Get an array of some or all
Fuse instances in active memory, with filtering options. |
|
public static |
open ( fuseOrID: Object ): Fuse |
Simple Syntax:Generate a new Fuse and begin intercepting
tween calls until close is called. |
|
public static |
openGroup ( fuseOrID: Object ): Fuse |
Simple Syntax: Begins a new animation group of
simultaneous actions. |
|
public |
pause ( ): Void |
Play-control: Pauses a playing Fuse instance and
its running tweens. Waits for resume call to proceed. |
|
public |
pop ( ): Object |
Removes the first element from a Fuse and returns that action object. |
|
public |
push ( ): Number |
Adds one or more elements to the end of a Fuse and returns the new length of the Fuse. |
|
public |
pushTween ( targets: Object, props: Object, endvals: Object, seconds: Number, ease: Object, delay: Number, callback: Object ): Number |
Lets you add an item to the Fuse in ZigoEngine.doTween()
syntax. Pushes tween arguments into Fuse instance and accepts the same arguments as ZigoEngine.doTween(). |
|
public |
removeEventListener ( event: String, handler: Object ): Void |
Remove a listener for a particular event |
|
public |
removeTarget ( t: Object ): Void |
Removes targets from the current default target
list. |
|
public |
resume ( ): Void |
Resumes a paused Fuse instance and its animations.
Attempts to correct for animations that have been disrupted during pause. |
|
public |
reverse ( ): Void |
Reverse the sequence of the Fuse |
|
public |
setStartProps ( trueOrItemIDs: Object ): Void |
General: Presets start-properties like start_x in
all or specific items. |
|
public |
shift ( ): Object |
Removes the first element from a Fuse and returns that action object. |
|
public |
skipTo ( indexOrLabel: Object ): Void |
Play-control: Starts Fuse at a particular index/label. |
|
public |
slice ( indexA: Number, indexB: Number ): Array |
Returns a new array instance consisting of a range
of elements from the original array without modifying the original array. The array returned by this method includes the indexA
element and all elements up to, but not including indexB element. If no parameters are passed, a duplicate of the original array
is generated. For more information, see the Flash help explanation of Array.slice. |
|
public |
splice ( startIndex: Number, deleteCount: Number ): Void |
Used to insert or remove items. Works almost exactly
like Array.splice. Removed actions are destroyed permanently, with the exception of nested Fuses. |
|
public |
start ( setStart: Object ): Void |
Play-control: Begins sequence play at index 0,
with option to set start props prior to play. |
|
public static |
startRecent ( setStart: Object ): Void |
Simple Syntax: Restarts the Fuse most recently
created using Fuse.open(). |
|
public |
stop ( ): Void |
Play-control: Stops a playing or paused Fuse instance
and resets the play-index to 0. |
|
public |
toString ( ): String |
public |
traceItems ( indexA: Number, indexB: Number ): Void |
Traces specific or all objects contained within
the fuse |
|
public |
unshift ( ): Number |
Adds one or more elements to the beginning of a Fuse and returns the new length of the Fuse. |
|
public var autoClear: Boolean |
Instance default: Fuse instance is automatically destroyed after playing once.
|
public static var AUTOCLEAR: Boolean = false |
Class default: whether Fuse instances are automatically destroyed after playing once unless otherwise
specified by instance-level autoClear.
|
public var autoStop: Boolean |
Instance default: Fuse instance stops when any of its running tweens are interrupted, or is destroyed
if autoClear is turned on.
|
public static var AUTOSTOP: Boolean = true |
Class default: whether Fuse instances stop when a tween is interrupted, or is destroyed if autoClear is
turned on, unless otherwise specified by instance-level autoStop.
|
public var duration: Number |
Instance default: duration value in seconds for any action that does not specify one.
|
public var easing: Object |
Instance default: easing value for any action that does not specify one.
|
public var label: String |
Instance default: Convenience, allows you to name any Fuse.
The Fuse label is used in output messages, and can be used to reference a Fuse instance in getInstance, fastForward and
Simple Syntax methods open and openGroup.
|
public static var OUTPUT_LEVEL: Number = 1 |
Class default: Controls how much feedback Fuse outputs, helpful for debugging.
|
public var scope: Object |
Instance default: scope for all functions run from a Fuse if left unspecified within the action.
|
public static var VERSION: String = FuseKitCommon.VERSION |
Class default: Enables kit version to be retrieved at runtime or when reviewing a decompiled swf.
|
|
Retrieves the current play-index of a Fuse instance. |
|
|
Retrieves the currently playing action's label, if defined.
{ label:"introFade", start_alpha:0, start_brightOffset:100, time:1.5, ease:"easeInExpo" } |
|
|
Instance default: an auto-assigned numerical reference |
|
|
Retrieves a Fuse instance's current play-state string. |
|
|
Instance default: Sets one or more animation targets that will be used for any actions that don't specify
their own.
Overwrites prior existing targets.
var f:Fuse = new Fuse(); f.target = [clip1, clip2]; |
|
|
Fuse extends Array to enable sequence-building & management using familiar methods like push() .
|
|||
|
|
Multi-purpose method for all non-animation Simple Syntax features. Usagevar f:Fuse = new Fuse(); // callback: scope, func, args Fuse.addCommand(this, "setItemData", 0, "Submit", true); // delay Fuse.addCommand("delay", .5); // inline Fuse play-command: // this final action will cause the Fuse to loop Fuse.addCommand("start"); // advance-trigger (should appear within group) Fuse.addCommand("trigger", .5); Some addCommand calls are allowed inside groups ( The Just as delays can stagger the start times of grouped tweens, triggers allow the ends of grouped animations to overlap with the
following action by advancing the action early. For example if an action contains two tweens, the longest of which is 2 seconds
plus a 1-second delay, including |
|||||||||
|
|
Add a listener for a particular event | ||||||
|
|
Adds to current default target list.
myFuse.addTarget(clip5); |
|||
|
|
Returns a copy of Fuse as a new Fuse instance. |
|
|
Simple Syntax: Completes the Fuse generated by open.
It is important that you complete each Fuse created using
Fuse.open() using either Fuse.close() or Fuse.closeAndStart() .
You cannot call start on a Fuse instance while Fuse is open.
var runSetup:Fuse = Fuse.open(); Fuse.addCommand(this, "callbackOne"); Fuse.addCommand("delay", .25); Fuse.addCommand(this, "callbackTwo"); Fuse.addCommand("delay", .25); Fuse.addCommand(this, "callbackThree"); Fuse.close(); // later in program... runSetup.start(); // reference the Fuse created |
|
|
Simple Syntax: Close the open Fuse instance and start it playing.
var runSetup:Fuse = Fuse.open(); clip1.fadeOut(); clip2.fadeOut(); clip3.fadeOut(); Fuse.closeAndStart(); |
|||
|
|
Simple Syntax: Closes an action group started by openGroup.
May be omitted if followed by
Fuse.close or Fuse.closeAndStart .If Fuse.openGroup() is called while a previous group was open, the preceding group is closed automatically and the closeGroup command
can be skipped.
Fuse.open(); clip1.tween("_x","100"); Fuse.openGroup(); clip1.tween("_x","-100"); clip2.tween("_scale",200); Fuse.closeGroup(); clip1.scaleTo(0); clip2.scaleTo(0); Fuse.closeAndStart(); |
|
|
Deletes all variables and properties in the Fuse instance.
|
|
|
Fast-forwards animations in some or all remaining actions.
Behavior:
|
|||
|
|
Gets both the default target list and any targets in the action currently being played. | |||
|
|
Instance-management: Gets a Fuse instance by its id or label
This simple method returns one known Fuse instance. For more complex options use getInstances.
|
|||
|
|
Instance-management: Get an array of some or all Fuse instances in active memory, with filtering options.
// get currently playing Fuses that handle the target my_mc var myMcFuses:Array = Fuse.getInstances("playing",my_mc); // get all the Fuses in active memory var fuses:Array = Fuse.getInstances(); |
||||||
|
|
Simple Syntax:Generate a new Fuse and begin intercepting tween calls until close is
called.
Simple Syntax is an alternative way to construct Fuse sequences. Its primary uses are 1. Clear method-call
sequencing and 2. An easy way for non-advanced coders to set up sequences.
|
|||
|
|
Simple Syntax: Begins a new animation group of simultaneous actions.
Fuse.openGroup(); can be called in place of Fuse.open(); .If Fuse.openGroup(); is called while a previous group was open, the preceding group is closed automatically.
// use in place of Fuse.open() to begin a new Fuse. Fuse.openGroup(); clip1.tween("_x","100"); clip2.tween("_scale",200); Fuse.openGroup(); // you can skip closeGroup if opening another group. clip1.tween("_x","-100"); clip2.tween("_scale",100); Fuse.closeAndStart(); // you can skip closeGroup here too. |
|||
|
|
Play-control: Pauses a playing Fuse instance and its running tweens. Waits for resume call to proceed. |
|
|
Removes the first element from a Fuse and returns that action object. |
|
|
Adds one or more elements to the end of a Fuse and returns the new length of the Fuse.
|
|||
|
|
Lets you add an item to the Fuse in ZigoEngine.doTween() syntax. Pushes tween arguments into Fuse instance and accepts the same arguments as ZigoEngine.doTween(). | |||||||||||||||||||||
|
|
Remove a listener for a particular event | ||||||
|
|
Removes targets from the current default target list.
myFuse.removeTarget(clip5); |
|||
|
|
Resumes a paused Fuse instance and its animations. Attempts to correct for animations that have been disrupted during pause. |
|
|
Reverse the sequence of the Fuse |
|
|
General: Presets start-properties like start_x in all or specific items.
In this example a sequence is set up and all start props are set, although the Fuse may not be used until later.
var f:Fuse = new Fuse(); f.target = clip1; f.push({ start_alpha:0 }); // fade up f.push({ x:'100', start_scale:150}); // scale down and slide f.setStartProps();If you want to set start props as the Fuse is started, you can pass setStartProps parameters to start. |
|||
|
|
Removes the first element from a Fuse and returns that action object. |
|
|
Play-control: Starts Fuse at a particular index/label.
var f:Fuse = new Fuse(); f.target = clip1; f.push({ start_alpha:0 }); f.push({ x:'100', label:"slideRight"}); //later... f.skipTo("slideRight"); // same as f.skipTo(1); |
|||
|
|
Returns a new array instance consisting of a range of elements from the original array without modifying the original array. The array returned by this method includes the indexA element and all elements up to, but not including indexB element. If no parameters are passed, a duplicate of the original array is generated. For more information, see the Flash help explanation of Array.slice. | ||||||
|
|
Used to insert or remove items. Works almost exactly like Array.splice. Removed actions are destroyed
permanently, with the exception of nested Fuses.
|
|||||||||
|
|
Play-control: Begins sequence play at index 0, with option to set start props prior to play.
In this example all start props are set during start by passing true.
var f:Fuse = new Fuse(); f.target = clip1; f.push({ start_alpha:0 }); // fade up f.push({ x:'100', start_scale:150}); // scale down and slide f.start(true); |
|||
|
|
Simple Syntax: Restarts the Fuse most recently created using Fuse.open(). | |||
|
|
Play-control: Stops a playing or paused Fuse instance and resets the play-index to 0. |
|
|
|
|
Traces specific or all objects contained within the fuse | ||||||
|
|
Adds one or more elements to the beginning of a Fuse and returns the new length of the Fuse.
|
|||
|
Events dispatched:
onStart
onStop
onPause
onResume
onAdvance
onComplete
Unlike ZigoEngine which uses AsBroadcaster, Fuse uses the mx EventDispatcher standard.
The Fuse utility is comprised of:
Fuse Object Syntax parameters are documented under the Fuse constructor.
Fuse Simple Syntax parameters are documented under Fuse.open.