(Preview)
Package | spark.effects |
Class | public class Animate |
Inheritance | Animate ![]() ![]() ![]() |
Subclasses | AnimateColor, AnimateFilter, AnimateTransform, AnimateTransitionShader, Fade, Resize |
Language Version: | ActionScript 3.0 |
Product Version: | Flex 4 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
motionPaths
property.
MXML Syntax![expanded expanded](../../images/expanded.gif)
The <s:Animate>
tag
inherits all of the tag attributes of its superclass,
and adds the following tag attributes:
<s:Animate Properties id="ID" disableLayout="false" easer="{spark.effects.easing.Sine(.5)}" interpolator="NumberInterpolator" motionPaths="no default" repeatBehavior="loop" />
Default MXML PropertymotionPaths
More examples
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance. | Object |
Protected Properties
Public Methods
Method | Defined By | ||
---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | |
![]() |
Dispatches an event into the event flow. | EventDispatcher | |
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | |
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
![]() |
Removes a listener from the EventDispatcher object. | EventDispatcher | |
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Protected Methods
Events
Event | Summary | Defined By | ||
---|---|---|---|---|
![]() | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | ||
![]() | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher |
Property Detail
Constructor Detail
Event Detail
Examples How to use this example
AnimateEffectExample.mxml
<?xml version="1.0"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Declarations> <s:Animate id="animateEffect" target="{targetBox}" repeatCount="2" repeatBehavior="reverse" disableLayout="true" effectStart="playButton.enabled=false" effectEnd="playButton.enabled=true;"> <s:motionPaths> <s:SimpleMotionPath property="x" valueFrom="0" valueTo="100"/> <s:SimpleMotionPath property="alpha" valueFrom="1" valueTo="0"/> </s:motionPaths> </s:Animate> </fx:Declarations> <s:Panel title="Animate Effect Example" width="75%" height="75%"> <mx:HBox width="100%" height="100%"> <!-- Our target to affect--> <mx:VBox id="targetBox" width="50%" horizontalAlign="center"> <mx:Label text="Nokia 9930" /> <mx:Image id="targetImg" source="@Embed(source='assets/Nokia_6630.png')"/> </mx:VBox> <mx:VBox id="detailsBox" width="50%" left="0"> <mx:Text width="99%" color="blue" text="The Animate effect animates any property or style of an object over time using animationProperty arrays. Click 'Animate' to watch the effect."/> </mx:VBox> </mx:HBox> <s:Rect left="0" right="0" bottom="0" height="30"> <s:fill> <s:LinearGradient rotation="90"> <s:GradientEntry color="0xE2E2E2" /> <s:GradientEntry color="0xD9D9D9" /> </s:LinearGradient> </s:fill> </s:Rect> <s:Button id="playButton" left="5" bottom="5" label="Animate" click="animateEffect.play();"/> </s:Panel> </s:Application>
Wed Nov 21 2018, 06:34 AM -08:00