Packagecom.gskinner.motion
Classpublic class GTweenFilter
InheritanceGTweenFilter Inheritance GTween Inheritance flash.events.EventDispatcher

GTweenFilter ©2008 Grant Skinner, gskinner.com. Visit www.gskinner.com/blog for documentation, updates and more free code. Licensed under the MIT license. See the source file header for more information.
GTweenFilter is an extension to GTween, a light-weight instance oriented tween engine. It allows you to tween the properties of filters on display objects. Using GTweenFilter is almost identical to using GTween. The only major difference is that you can specify a filterIndex (which defaults to 0) to indicate which filter in the target objects .filters array will be affected by the Tween. You can use multiple instances of GTweenFilter with different filterIndexes to tween multiple filters on a single target. You can take advantage of .addChild to synchronize multiple filter tweens.



Public Properties
 PropertyDefined by
 InheritedassignmentProperty : String
Allows you to reassign the .target object back to a property specified by assignmentProperty of an object specified by assignmentTarget.
GTween
 InheritedassignmentTarget : Object
Allows you to reassign the .target object back to a property specified by assignmentProperty of an object specified by assignmentTarget.
GTween
 InheritedautoHide : Boolean
Indicates whether the target's visible property should automatically be set to false when its alpha value is tweened to 0 or less.
GTween
 InheritedautoPlay : Boolean = true
Indicates whether the tween should automatically play when a destination value is changed.
GTween
 InheritedautoReverse : Boolean = false
Specifies whether the tween should automatically reverse its initial and destination property values when it reaches its end.
GTween
 Inheriteddata : *
Allows you to associate arbitrary data with your tween.
GTween
 InheriteddefaultEase : Function
[static] Specifies the default easing function to use with new tweens.
GTween
 Inheriteddelay : Number
The length of the delay in frames or seconds (depending on the timingMode).
GTween
 Inheritedduration : Number
The length of the tween in frames or seconds (depending on the timingMode).
GTween
 Inheritedease : Function
The transition function to use for calculating the tween.
GTween
  filterIndex : uint = 0
Indicates the index of the filter in the target's .filters array to apply the tween to.
GTweenFilter
 InheritedlastProgressPoint : *
Returns the name of the last progress point that was passed, or null if none.
GTween
 InheritednextTween : GTween
Specifies another GTween instance that will have .play() called on it when this tween completes.
GTween
 InheritedpauseAll : Boolean = false
[static] Setting this to true pauses all tween instances.
GTween
 Inheritedpaused : Boolean
Indicates whether the tween is currently paused (including when it is at the beginning or end).
GTween
 Inheritedposition : Number
Gets and sets the position in the tween in frames or seconds (depending on the timingMode).
GTween
  propertyTarget : Object
[read-only]
GTweenFilter
 Inheritedproxy : Object
The proxy object allows you to work with the properties and methods of the target object directly through GTween.
GTween
 InheritedrotationProperties : Object
[static] A hash table specifying properties that should be affected by smartRotation.
GTween
 InheritedsnappingProperties : Object
[static] A hash table specifying properties that should have their value rounded (snapped) before being applied.
GTween
 Inheritedstate : String
Returns the current positional state of the tween.
GTween
 Inheritedtarget : Object
The target object to tween.
GTween
 InheritedtimeInterval : uint
[static] Sets the time in milliseconds between updates when timingMode is set to GTween.TIME ("time").
GTween
 InheritedtimingMode : String
[static] Indicates how GTween should deal with timing.
GTween
 InheriteduseSetSize : Boolean = true
Allows you to specify whether to use .setSize() to set width and height properties if it is available.
GTween
 InheriteduseSmartRotation : Boolean = true
When true, the tween will always rotate in the shortest direction to reach the destination rotation.
GTween
 InheriteduseSnapping : Boolean = false
If set to true, tweened values specified by snapProperties will be rounded (snapped) before they are assigned to the target.
GTween
Public Methods
 MethodDefined by
  
GTweenFilter(target:Object = null, duration:Number = 10, properties:Object = null, tweenProperties:Object = null)
Constructs a new GTweenFilter instance.
GTweenFilter
 Inherited
addChild(child:GTween, synchMode:String):void
Adds a child tween.
GTween
 Inherited
addProgressPoint(position:Number, data:* = null):void
Adds a tween position at which to generate a progress event.
GTween
 Inherited
beginning():void
Jumps the tween to its beginning and pauses it.
GTween
 Inherited
clone(target:Object = null, preserveChildren:Boolean = false, preserveState:Boolean = false):GTween
Creates a clone of the GTween instance.
GTween
 Inherited
deleteProperty(propertyName:String):Boolean
Removes a destination value from the tween.
GTween
 Inherited
end(endNextTween:Boolean = true):void
Jumps the tween to its end.
GTween
 Inherited
getProperty(propertyName:String):Number
Returns the destination value for the specified property if one exists.
GTween
 Inherited
invalidate():void
Invalidate forces the tween to repopulate all of the initial properties from the target object, and start playing if autoplay is set to true.
GTween
 Inherited
linearEase(value:Number, ... args):Number
[static] The default easing function used by GTween.
GTween
 Inherited
pause():void
Pauses the tween by stopping tick from being automatically called.
GTween
 Inherited
play():void
Plays a tween by incrementing the position property each frame.
GTween
 Inherited
Removes all progress points.
GTween
 Inherited
removeChild(child:GTween):void
Removes a child tween.
GTween
 Inherited
removeProgressPoint(position:Number, data:* = null):void
Removes the specified progress point.
GTween
 Inherited
reset():void
Resets the tween, pausing it, deleting all destination values, resetting the tween position to the beginning, and nulling the lastProgressPoint.
GTween
 Inherited
reverse(reverseChildren:Boolean = false):void
Reverses the tween by swapping its initial and destination properties.
GTween
 Inherited
setAssignment(assignmentTarget:Object = null, assignmentProperty:String = null):void
Allows you to tween objects that require re-assignment whenever they are modified by reassigning the target object to a specified property of another object.
GTween
 Inherited
setProperties(properties:Object):void
Shorthand method for making multiple setProperty calls quickly.
GTween
 Inherited
setProperty(propertyName:String, value:Number):void
Sets the numeric destination value for a property on the target object that you would like to tween.
GTween
 Inherited
setTweenProperties(tweenProperties:Object):void
Shortcut method for setting multiple properties on the tween object quickly.
GTween
Events
 EventSummaryDefined by
 Inherited Dispatched when a tween activates and first starts running.GTween
 Inherited This event is dispatched each time the tween updates properties on its target.GTween
 Inherited Dispatched when a tween ends (its position equals its duration).GTween
 Inherited Dispatched when a tween copies its initial properties and starts tweening.GTween
 Inherited This event is dispatched when the tween passes a progress point, and the lastProgressPoint property is updated.GTween
Public Constants
 ConstantDefined by
 InheritedBEGINNING : String = "beginning"
[static] Constant for the BEGINNING state, and for BEGINNING synchronization mode on addChild.
GTween
 InheritedDELAY_PHASE : String = "delayPhase"
[static] Constant for the DELAY_PHASE state, and for DELAY_PHASE synchronization mode on addChild (which is the same as the BEGINNING synchronization mode).
GTween
 InheritedDURATION : String = "duration"
[static] Constant for DURATION synchronization mode on addChild.
GTween
 InheritedEND : String = "end"
[static] Constant for the END state, and for END synchronization mode on addChild.
GTween
 InheritedFRAME : String = "frame"
[static] Constant for the FRAME timingMode.
GTween
 InheritedHYBRID : String = "hybrid"
[static] Constant for the HYBRID timingMode.
GTween
 InheritedPROGRESS : String = "progress"
[static] Constant for the PROGRESS event type.
GTween
 InheritedTIME : String = "time"
[static] Constant for the TIME timingMode.
GTween
 InheritedTWEEN_PHASE : String = "tweenPhase"
[static] Constant for the TWEEN_PHASE state, and for TWEEN_PHASE synchronization mode on addChild.
GTween
Property detail
filterIndexproperty
public var filterIndex:uint = 0

Indicates the index of the filter in the target's .filters array to apply the tween to. Defaults to 0, which will tween the first filter in the target's filters array.

propertyTargetproperty 
propertyTarget:Object  [read-only]Implementation
    public function get propertyTarget():Object
Constructor detail
GTweenFilter()constructor
public function GTweenFilter(target:Object = null, duration:Number = 10, properties:Object = null, tweenProperties:Object = null)

Constructs a new GTweenFilter instance. See the GTween documentation for a description of the parameters.

Parameters
target:Object (default = null)
 
duration:Number (default = 10)
 
properties:Object (default = null)
 
tweenProperties:Object (default = null)