Class: TweenUnit

system.transitions. TweenUnit


new TweenUnit()

The TweenUnit class interpolate in time a value between 0 and 1.

The TweenUnit class interpolate in time a value between 0 and 1.

Tutorials:
Example
var change = function( tween )
{
    trace( 'progress ' + tween.position ) ;
}

var finish = function()
{
    trace( 'finish' ) ;
}

var start = function()
{
    trace( 'start' ) ;
}

var tween = new TweenUnit( core.easings.backOut , 48 ) ;

//tween.easing = core.easings.cubicOut ;
//tween.easing = core.easings.elasticOut ;
//tween.easing = core.easings.sineOut ;

/tween.fps = 24  ; // use the system.process.Timer class
tween.fps = NaN ; // Use the system.process.FrameTimer

//tween.looping = true ;

tween.finishIt.connect( finish ) ;
tween.changeIt.connect( change ) ;
tween.startIt.connect( start ) ;

tween.run() ;

Extends

Members


clone :function

Returns a shallow copy of this object.

Type:
  • function
Overrides:

duration :number

Indicates the duration of the tweened animation in frames or seconds (default 0).

Type:
  • number
Inherited From:
Default Value:
  • false

easing :function

Defines the easing method reference of this entry.

Type:
  • function
See:

fps :number

Indicates the number of frames per second of the tweened animation.

Type:
  • number
Inherited From:
Default Value:
  • NaN

position :number

The current position of this tween.

Type:
  • number
Default Value:
  • 0

prevTime :number

Indicates the internal previous time value.

Type:
  • number
Inherited From:

set :function

Set the TweenUnit properties.

Type:
  • function
See:

stopped :boolean

Indicates if the motion is stopped.

Type:
  • boolean
Inherited From:
Default Value:
  • false

target :Object

Indicates the target reference of the object contrains by the Motion effect.

Type:
  • Object
Inherited From:

update :function

Update the current tween.

Type:
  • function
Overrides:

useSeconds :boolean

Defined if the Motion used seconds or not.

Type:
  • boolean
Inherited From:
Default Value:
  • false

Methods


nextFrame()

Forwards the tweened animation to the next frame.

Inherited From:

prevFrame()

Directs the tweened animation to the frame previous to the current frame.

Inherited From:

resume()

Resumes a tweened animation from its stopped point in the animation.

Inherited From:

rewind(time)

Rewinds a tweened animation to the beginning of the tweened animation.

Parameters:
Name Type Description
time number

The time value to rewind the motion.

Inherited From:

run()

Runs the object.

Inherited From:

setTime(time)

Sets the current time within the duration of the animation.

Parameters:
Name Type Description
time number

The time value to rewind the motion.

Inherited From:

startInterval()

Starts the internal interval of the tweened animation.

Inherited From:

stop()

Stops the tweened animation at its current position.

Inherited From:

stopInterval()

Stops the intenral interval of the tweened animation.

Inherited From: