This class control the possition of the linked movieclip relative to the LayoutManager associated with it.
1.0
Marcos
LayoutManager, LayoutLayer, LayoutOrientation, LayoutPosition, LayoutType
| com. | This class control the possition of the linked movieclip relative to the LayoutManager associated with it. |
| Variables | |
| _identifier | The id of the LayoutItem |
| _target | Reference to the movieclip linked with the LayoutItem |
| _typePosX | Type of the horizontal position |
| _typePosY | Type of the vertical position |
| _align | The alignment of the LayoutItem |
| _disX | Horizontal distance relative to its alignment |
| _disY | Vertical distance relative to its alignment |
| _offsetX | Distance from the registration point to the left corner of the movieclip linked with this LayoutItem |
| _offsetY | Distance from the registration point to the top corner of the movieclip linked with this LayoutItem |
| _animated | |
| Functions | |
| LayoutItem | Constructor Set all the properties of the LayoutItem |
| update | Update the position and orientation of the movieclip linked with it. |
| horizontalUpdate | Update the x position of the movieclip. |
| verticalUpdate | Update the y position of the movieclip. |
| destroy | Destroy the movieclip reference and the LayoutItem object |
public function update( posxmng: Number, posymng: Number, widthmng: Number, heightmng: Number, orient: String ):Void
Update the position and orientation of the movieclip linked with it.
| posxmng | : x position of the associated LayoutManager |
| posymng | : y position of the associated LayoutManager |
| widthmng | : width of the associated LayoutManager |
| heightmng | : height of the associated LayoutManager |
| orien | : orientation of the associated LayoutManager |
16/09/2007
Marcos
private function horizontalUpdate( posxmng: Number, /*posymng: Number, */ widthmng: Number/*, heightmng: Number*/, o: String ):Number
Update the x position of the movieclip. It’s important to know that 90º degrees rotation of a movieclip produces a swap between the values of his width and height. First of all we check the value of the orientation, and then check the LayoutType. The last step is update the x value depending the alignment.
| posxmng | : the x value of the manager associated with the clip |
| widthmng | : the with of the manager associated with the clip |
| o | : the orientation selected |
the new movieclip x position
16/09/2007
Marcos
private function verticalUpdate( /*posxmng: Number, */ posymng: Number, /*widthmng: Number, */ heightmng: Number, o: String ):Number
Update the y position of the movieclip. It’s important to know that 90º degrees rotation of a movieclip produces a swap between the values of his width and height. First of all we check the value of the orientation, and then check the LayoutType. The last step is update the y value depending the alignment.
| posymng | : the y value of the manager associated with the clip |
| heightmng | : the height of the manager associated with the clip |
| o | : the orientation selected |
the new movieclip y position
16/09/2007
Marcos
The id of the LayoutItem
private var _identifier: String
Reference to the movieclip linked with the LayoutItem
private var _target: MovieClip
Type of the horizontal position
private var _typePosX: String
Type of the vertical position
private var _typePosY: String
The alignment of the LayoutItem
private var _align: String
Horizontal distance relative to its alignment
private var _disX: Number
Vertical distance relative to its alignment
private var _disY: Number
Distance from the registration point to the left corner of the movieclip linked with this LayoutItem
private var _offsetX: Number
Distance from the registration point to the top corner of the movieclip linked with this LayoutItem
private var _offsetY: Number
private var _animated: Boolean
Constructor Set all the properties of the LayoutItem
public function LayoutItem( id: String, tgt: MovieClip, typX: String, typY: String, align: String, dx: Number, dy: Number, offx: Number, offy: Number, anim: Boolean )
Update the position and orientation of the movieclip linked with it.
public function update( posxmng: Number, posymng: Number, widthmng: Number, heightmng: Number, orient: String ):Void
Update the x position of the movieclip.
private function horizontalUpdate( posxmng: Number, /*posymng: Number, */ widthmng: Number/*, heightmng: Number*/, o: String ):Number
Update the y position of the movieclip.
private function verticalUpdate( /*posxmng: Number, */ posymng: Number, /*widthmng: Number, */ heightmng: Number, o: String ):Number
Destroy the movieclip reference and the LayoutItem object
public function destroy():Void