UIObject.move()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
componentInstance.move(x, y, noEvent)
Parameters
A number that indicates the position of the object's upper left corner, relative to its parent.
x
A number that indicates the position of the object's upper left corner, relative to its parent.
y
A Boolean value that indicates whether the move event should be dispatched.
noEvent
Returns
Nothing.
Description
Method; moves the object to the requested position. Pass only integer values to
, or the component may appear fuzzy.
UIObject.move()
Example
The following example moves the check box 10 pixels to the right:
myCheckbox.move(myCheckbox.x + 10, myCheckbox.y);
The following example calls the
, from its current position to the upper-left corner (10,10) of the Stage:
my_button
var my_button:mx.controls.Button;
my_button.addEventListener("move", doMove);
function doMove(evt_obj:Object):Void {
trace(evt_obj.target + " moved from {oldX:" + evt_obj.oldX + ", oldY:" +
evt_obj.oldY + "} to {x:" + evt_obj.target.x + ", y:" + evt_obj.target.y
+ "}");
}
my_button.move(10, 10);
method to reposition a Button component,
move()
UIObject.move()
1375
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers