| Package | mx.effects |
| Class | public class Move |
| Inheritance | Move TweenEffect Effect EventDispatcher Object |
xFrom and
yFrom values, the destination position with xTo
and yTo, or the number of pixels to move the component
with xBy and yBy.
If you specify any two of the values (initial position, destination,
or amount to move), Flex calculates the third.
If you specify all three, Flex ignores the xBy and
yBy values.
If you specify only the xTo and yTo values
or the xBy and yBy values,
Flex sets xFrom and yFrom to be the object's
current position.
If you specify a Move effect for a moveEffect trigger,
and if you do not set the six From, To, and By properties,
Flex sets them to create a smooth transition between the object's
old position and its new position.
If the object's position was originally determined by its parent
container (for example, the object is inside an HBox container),
the object's position may be reset to its original position next time
that the container's layout code runs.
To avoid snapping back to the original position, place the object
inside a Canvas container, or set the parent container's
autoLayout property to false.
Hide MXML Syntax
The <mx:Move> tag
inherits all of the tag attributes of its of its superclass,
and adds the following tag attributes:
<mx:Move
id="ID"
xFrom="val"
yFrom="val"
xTo="val"
yTo="val"
xBy="val"
yBy="val"
/>
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | className : String
The name of the effect class, such as
"Fade". | Effect | |
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance.
| Object | |
![]() | customFilter : EffectTargetFilter
Specifies a custom filter object, of type EffectTargetFilter, used by
the effect to determine the targets on which to play the effect.
| Effect | |
![]() | duration : Number
Duration of the effect in milliseconds.
| Effect | |
![]() | easingFunction : Function = null
The easing function for the animation.
| TweenEffect | |
![]() | filter : String
Specifies an algorithm for filtering targets for an effect.
| Effect | |
![]() | instanceClass : Class
An object of type Class that specifies the effect
instance class class for this effect class.
| Effect | |
![]() | isPlaying : Boolean
A read-only flag which is true if any instances of the effect
are currently playing, and false if none are.
| Effect | |
![]() | prototype : Object
[static]
A reference to the prototype object of a class or function object.
| Object | |
![]() | relevantProperties : Array
An Array of property names to use when performing filtering.
| Effect | |
![]() | relevantStyles : Array
An Array of style names to use when performing filtering.
| Effect | |
![]() | repeatCount : int = 1
Number of times to repeat the effect.
| Effect | |
![]() | repeatDelay : int = 0
Amount of time, in milliseconds, to wait before repeating the effect.
| Effect | |
![]() | startDelay : int = 0
Amount of time, in milliseconds, to wait before starting the effect.
| Effect | |
![]() | suspendBackgroundProcessing : Boolean = false
If
true, blocks all background processing
while the effect is playing. | Effect | |
![]() | target : Object
The UIComponent object to which this effect is applied.
| Effect | |
![]() | targets : Array
An Array of UIComponent objects that are targets for the effect.
| Effect | |
| xBy : Number
Number of pixels to move the components along the x axis.
| Move | ||
| xFrom : Number
Initial position's x coordinate.
| Move | ||
| xTo : Number
Destination position's x coordinate.
| Move | ||
| yBy : Number
Number of pixels to move the components along the y axis.
| Move | ||
| yFrom : Number
Initial position's y coordinate.
| Move | ||
| yTo : Number
Destination position's y coordinate.
| Move | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| Move | ||
![]() |
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 | |
![]() |
Captures the current values of the relevant properties
on the effect's targets.
| Effect | |
![]() |
Creates a single effect instance and initializes it.
| Effect | |
![]() |
Takes an Array of target objects and invokes the
createInstance() method on each target. | Effect | |
![]() |
Dispatches an event into the event flow.
| EventDispatcher | |
![]() |
Interrupts an effect that is currently playing,
and jumps immediately to the end of the effect.
| Effect | |
![]() |
Returns an Array of Strings, where each String is the name
of a property that is changed by this effect.
| Effect | |
![]() |
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 | |
![]() |
Pauses the effect until you call the
resume() method. | Effect | |
![]() |
Begins playing the effect.
| Effect | |
![]() |
Indicates whether the specified property exists and is enumerable.
| Object | |
![]() |
Removes a listener from the EventDispatcher object.
| EventDispatcher | |
![]() |
Resumes the effect after it has been paused
by a call to the
pause() method. | Effect | |
![]() |
Plays the effect in reverse, if the effect is currently playing,
starting from the current position of the effect.
| Effect | |
![]() |
Sets the availability of a dynamic property for loop operations.
| 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 | |
| xBy | property |
public var xBy:NumberNumber of pixels to move the components along the x axis. Values can be negative.
| xFrom | property |
public var xFrom:NumberInitial position's x coordinate.
| xTo | property |
public var xTo:NumberDestination position's x coordinate.
| yBy | property |
public var yBy:NumberNumber of pixels to move the components along the y axis. Values can be negative.
| yFrom | property |
public var yFrom:NumberInitial position's y coordinate.
| yTo | property |
public var yTo:NumberDestination position's y coordinate.
| Move | () | constructor |
public function Move(target:Object = null)Constructor.
Parameterstarget:Object (default = null) — The Object to animate with this effect.
|
<?xml version="1.0"?>
<!-- Simple example to demonstrate the Move effect. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function moveImage():void {
myMove.end();
myMove.xTo=mouseX-60;
myMove.play();
}
]]>
</mx:Script>
<mx:Move id="myMove" target="{img}"/>
<mx:Panel title="Move Effect Example" width="95%" height="95%"
paddingTop="5" paddingLeft="10" paddingRight="10" paddingBottom="5">
<mx:Text width="100%" color="blue"
text="Click anywhere on the canvas to move the phone horizontally to that position"/>
<mx:Canvas id="canvas" width="100%" height="100%" mouseDown="moveImage();">
<mx:Image id="img" source="@Embed(source='assets/Nokia_6630.png')"/>
</mx:Canvas>
</mx:Panel>
</mx:Application>
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/2/langref/mx/effects/Move.html