Tween

Kind of class:public interface
Package:com.bourre.transitions
Inherits from:Suspendable
Known subinterfaces:
Author:Cédric Néhémie
Classpath:com.bourre.transitions.Tween
File last modified:Monday, 24 November 2008, 11:36:57
The Tween interface defines a tween, a property animation
performed on a target object over a period of time. That animation
can be a change in position, a change in size, a change in visibility,
or other types of animations.

When defining tween effects, you typically create an instance of
a concret Tween class. A tween instance accepts the
startValue, endValue, and duration properties, and an optional
easing function to define the animation.

Concret tweens doesn't specifically work on a special member type.
A tween should work for both properties and methods of an object.
See the Accessor interface
for a description of members access.

See also:
  • com.bourre.code.Accessor
  • com.bourre.commands.TimelineCommand

Summary


Instance methods
  • setEasing (f:Function) : void
    • Defines the easing function used by this Tween object.

Instance methods

setEasing

public function setEasing (
f:Function) : void

Defines the easing function used by this Tween object.

Easing function can't be null, concret implementation must provide
a default function if no function is defined, or if the passed-in
function is null.

Parameters:
f:
easing function for this tween, the function must implements
the following signature :
function easingFunc( t : Number, b : Number, c : Number, d : Number ) : Number
Where :
  • t is the elapsed time since start in milliseconds
  • b is the the start value
  • c is the size of the value range suchc = endValue - startValue
  • d is the duration of the tween in milliseconds
  • the returned value is the the interpolated value