Packageorg.as3lib.kitchensync.action.tweentarget
Classpublic class TargetProperty
ImplementsITweenTarget

A TweenTarget used to tween numeric properties of an object.



Public Properties
 PropertyDefined by
  currentValue : Number
The current value of the property.
TargetProperty
  differenceInValues : Number
[read-only] The total amount of change between the start and end values.
TargetProperty
  endValue : Number
The value to end on when tweening.
TargetProperty
  property : String
[read-only] The string name of the property of the target object that you want to tween.
TargetProperty
  snapToInteger : Boolean
Indicates whether tweened values should snap to whole value numbers or use decimals.
TargetProperty
  startValue : Number
The value to start from when tweening.
TargetProperty
  target : Object
[read-only] The object containing the property you want to tween.
TargetProperty
Protected Properties
 PropertyDefined by
  _endValue : Number
TargetProperty
  _property : String
TargetProperty
  _snapToInteger : Boolean
TargetProperty
  _startValue : Number
TargetProperty
  _target : Object
TargetProperty
Public Methods
 MethodDefined by
  
TargetProperty(target:Object, property:String, startValue:Number, endValue:Number)
Constructor.
TargetProperty
  
Create a copy of the tweenTarget object
TargetProperty
  
reset():void
Returns the tweenTarget to its pre-tweened state
TargetProperty
  
setTargetPropterty(target:Object, property:String):void
Sets the target object and property name that will be tweened.
TargetProperty
  
updateTween(percentComplete:Number):Number
The main function that the Tween uses to update the TweenTarget.
TargetProperty
Property detail
currentValueproperty
currentValue:Number  [read-write]

The current value of the property. Using the setter directly sets the value.

Implementation
    public function get currentValue():Number
    public function set currentValue(value:Number):void

Throws
— if the target or property aren't set.
differenceInValuesproperty 
differenceInValues:Number  [read-only]

The total amount of change between the start and end values. (used internally)

Implementation
    public function get differenceInValues():Number
_endValueproperty 
protected var _endValue:Number
endValueproperty 
endValue:Number  [read-write]

The value to end on when tweening.

Implementation
    public function get endValue():Number
    public function set endValue(value:Number):void
_propertyproperty 
protected var _property:String
propertyproperty 
property:String  [read-only]

The string name of the property of the target object that you want to tween. Note: the property must be a numeric value.

Implementation
    public function get property():String
_snapToIntegerproperty 
protected var _snapToInteger:Boolean
snapToIntegerproperty 
snapToInteger:Boolean  [read-write]

Indicates whether tweened values should snap to whole value numbers or use decimals. If set to true, the results of the easing functions on the target property will be rounded to the nearest integer.

Implementation
    public function get snapToInteger():Boolean
    public function set snapToInteger(value:Boolean):void

See also

org.as3lib.kitchensync.ActionDefaults
_startValueproperty 
protected var _startValue:Number
startValueproperty 
startValue:Number  [read-write]

The value to start from when tweening.

Implementation
    public function get startValue():Number
    public function set startValue(value:Number):void
_targetproperty 
protected var _target:Object
targetproperty 
target:Object  [read-only]

The object containing the property you want to tween.

Implementation
    public function get target():Object
Constructor detail
TargetProperty()constructor
public function TargetProperty(target:Object, property:String, startValue:Number, endValue:Number)

Constructor.

Parameters
target:Object — the object whose property you want to tween
 
property:String — the name of the numeric property to tween
 
startValue:Number — the value to start from when tweening
 
endValue:Number — the value to end on when tweening
Method detail
clone()method
public function clone():ITweenTarget

Create a copy of the tweenTarget object

Returns
ITweenTarget
reset()method 
public function reset():void

Returns the tweenTarget to its pre-tweened state

setTargetPropterty()method 
public function setTargetPropterty(target:Object, property:String):void

Sets the target object and property name that will be tweened.

Parameters
target:Object — an object that contains the numeric property to tween.
 
property:String — the name of the numeric property to tween.
updateTween()method 
public function updateTween(percentComplete:Number):Number

The main function that the Tween uses to update the TweenTarget. Sets the percentage complete.

Parameters
percentComplete:Number — a number between 0 and 1 (but sometimes more or less) that represents the percentage of the tween that has been completed. This should update

Returns
Number — Number the new current value of the tween.