Class: Motion

system.transitions. Motion


new Motion( [id])

The abstract motion class.

Parameters:
Name Type Argument Default Description
id number <optional>
null

The identfier of the object.

Implements:

Members


duration :number

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

Type:
  • number
Default Value:
  • false

fps :number

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

Type:
  • number
Default Value:
  • NaN

prevTime :number

Indicates the internal previous time value.

Type:
  • number

stopped :boolean

Indicates if the motion is stopped.

Type:
  • boolean
Default Value:
  • false

target :Object

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

Type:
  • Object

useSeconds :boolean

Defined if the Motion used seconds or not.

Type:
  • boolean
Default Value:
  • false

Methods


clone()

Returns a shallow copy of this object.

Implements:
Returns:

a shallow copy of this object.


nextFrame()

Forwards the tweened animation to the next frame.


prevFrame()

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


resume()

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

Implements:

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.


run()

Runs the object.

Implements:

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.


startInterval()

Starts the internal interval of the tweened animation.


stop()

Stops the tweened animation at its current position.

Implements:

stopInterval()

Stops the intenral interval of the tweened animation.


<abstract> update()

Update the current object.