Packageorg.flowplayer.view
Classpublic class AnimationEngine

AnimationAngine is used to animate DisplayProperties.



Public Methods
 MethodDefined by
  
AnimationEngine(panel:Panel, pluginRegistry:PluginRegistry)
AnimationEngine
  
animate(disp:DisplayObject, props:Object, durationMillis:int = 400, endCallback:Function = null, easeFunc:Function = null):DisplayProperties
Animates a DisplayObject according to supplied properties.
AnimationEngine
  
animateProperty(view:DisplayObject, propertyName:String, target:Number, durationMillis:int = 500, callback:Function = null, easeFunc:Function = null):void
Animates a single DisplayObject property.
AnimationEngine
  
cancel(view:DisplayObject, currentAnimation:Animation = null):void
Cancels all animations that are currently running for the specified view.
AnimationEngine
  
fadeIn(view:DisplayObject, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation
Fades in a DisplayObject.
AnimationEngine
  
fadeOut(view:DisplayObject, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation
Fades out a DisplayObject.
AnimationEngine
  
fadeTo(view:DisplayObject, alpha:Number, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation
Fades a DisplayObject to a specified alpha value.
AnimationEngine
  
hasAnimationRunning(view:DisplayObject):Boolean
AnimationEngine
Constructor detail
AnimationEngine()constructor
public function AnimationEngine(panel:Panel, pluginRegistry:PluginRegistry)Parameters
panel:Panel
 
pluginRegistry:PluginRegistry
Method detail
animate()method
public function animate(disp:DisplayObject, props:Object, durationMillis:int = 400, endCallback:Function = null, easeFunc:Function = null):DisplayProperties

Animates a DisplayObject according to supplied properties. If the supplied display object is a plugin, the properties can contain relative values and percentage values. A relative value specifies a new position relative to the plugin's current position. For example: animations.animate("content", { top: "+20px", left: "-20%", width: 90 }); Here we animate the content plugin so that the top position is increased by 20 pixels, left position is decreased by 20%, and the width is set to 90 pixels. Following display properties can be animated with relative and absolute, pixel based and percentage values:

The opacity property only supports absolute numeric values.

All changes made to the plugin's display propertites are stored into the PluginRegistry

Parameters
disp:DisplayObject — the name of the plugin to animate, the plugin is looked up from the PluginRegistry using this name
 
props:Object — an object containing display properties
 
durationMillis:int (default = 400) — the duration it takes for the animation to complete
 
endCallback:Function (default = null) — a function to be called when the animation is complete
 
easeFunc:Function (default = null)

Returns
DisplayProperties

See also

animate()
PluginRegistry
animateNonPanel()method 
flow_internal function animateNonPanel(parent:DisplayObject, disp:DisplayObject, props:Object, durationMillis:int = 400, endCallback:Function = null):DisplayPropertiesParameters
parent:DisplayObject
 
disp:DisplayObject
 
props:Object
 
durationMillis:int (default = 400)
 
endCallback:Function (default = null)

Returns
DisplayProperties
animateProperty()method 
public function animateProperty(view:DisplayObject, propertyName:String, target:Number, durationMillis:int = 500, callback:Function = null, easeFunc:Function = null):void

Animates a single DisplayObject property.

Parameters
view:DisplayObject — the display object to animate
 
propertyName:String — the property to animate
 
target:Number — property target value
 
durationMillis:int (default = 500)
 
callback:Function (default = null)
 
easeFunc:Function (default = null)
cancel()method 
public function cancel(view:DisplayObject, currentAnimation:Animation = null):void

Cancels all animations that are currently running for the specified view. The callbacks specified in animation calls are not invoked for canceled animations.

Parameters
view:DisplayObject — if specified all other animations except the specified one will be canceled
 
currentAnimation:Animation (default = null)
fadeIn()method 
public function fadeIn(view:DisplayObject, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation

Fades in a DisplayObject.

Parameters
view:DisplayObject
 
durationMillis:Number (default = 500)
 
callback:Function (default = null)
 
updatePanel:Boolean (default = true)

Returns
Animation
fadeOut()method 
public function fadeOut(view:DisplayObject, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation

Fades out a DisplayObject.

Parameters
view:DisplayObject
 
durationMillis:Number (default = 500)
 
callback:Function (default = null)
 
updatePanel:Boolean (default = true)

Returns
Animation
fadeTo()method 
public function fadeTo(view:DisplayObject, alpha:Number, durationMillis:Number = 500, callback:Function = null, updatePanel:Boolean = true):Animation

Fades a DisplayObject to a specified alpha value.

Parameters
view:DisplayObject
 
alpha:Number
 
durationMillis:Number (default = 500)
 
callback:Function (default = null)
 
updatePanel:Boolean (default = true)

Returns
Animation
hasAnimationRunning()method 
public function hasAnimationRunning(view:DisplayObject):BooleanParameters
view:DisplayObject

Returns
Boolean