com.blocketpc.managers.layoutmanager.LayoutItem

This class control the possition of the linked movieclip relative to the LayoutManager associated with it.

Version

1.0

Author

Marcos

See Also

LayoutManager, LayoutLayer, LayoutOrientation, LayoutPosition, LayoutType

Summary
com.blocketpc.managers.layoutmanager.LayoutItemThis class control the possition of the linked movieclip relative to the LayoutManager associated with it.
Variables
_identifierThe id of the LayoutItem
_targetReference to the movieclip linked with the LayoutItem
_typePosXType of the horizontal position
_typePosYType of the vertical position
_alignThe alignment of the LayoutItem
_disXHorizontal distance relative to its alignment
_disYVertical distance relative to its alignment
_offsetXDistance from the registration point to the left corner of the movieclip linked with this LayoutItem
_offsetYDistance from the registration point to the top corner of the movieclip linked with this LayoutItem
_animated
Functions
LayoutItemConstructor Set all the properties of the LayoutItem
updateUpdate the position and orientation of the movieclip linked with it.
horizontalUpdateUpdate the x position of the movieclip.
verticalUpdateUpdate the y position of the movieclip.
destroyDestroy the movieclip reference and the LayoutItem object

Variables

_identifier

private var _identifier: String

The id of the LayoutItem

_target

private var _target: MovieClip

Reference to the movieclip linked with the LayoutItem

_typePosX

private var _typePosX: String

Type of the horizontal position

_typePosY

private var _typePosY: String

Type of the vertical position

_align

private var _align: String

The alignment of the LayoutItem

_disX

private var _disX: Number

Horizontal distance relative to its alignment

_disY

private var _disY: Number

Vertical distance relative to its alignment

_offsetX

private var _offsetX: Number

Distance from the registration point to the left corner of the movieclip linked with this LayoutItem

_offsetY

private var _offsetY: Number

Distance from the registration point to the top corner of the movieclip linked with this LayoutItem

_animated

private var _animated: Boolean

Functions

LayoutItem

public function LayoutItem(id: String,
tgt: MovieClip,
typX: String,
typY: String,
align: String,
dx: Number,
dy: Number,
offx: Number,
offy: Number,
anim: Boolean)

Constructor Set all the properties of the LayoutItem

Since

16/09/2007

Author

Marcos

update

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.

Parameters

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

Since

16/09/2007

Author

Marcos

horizontalUpdate

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.

Parameters

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

Returns

the new movieclip x position

Since

16/09/2007

Author

Marcos

verticalUpdate

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.

Parameters

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

Returns

the new movieclip y position

Since

16/09/2007

Author

Marcos

destroy

public function destroy():Void

Destroy the movieclip reference and the LayoutItem object

Since

16/09/2007

Author

Marcos

private var _identifier: String
The id of the LayoutItem
private var _target: MovieClip
Reference to the movieclip linked with the LayoutItem
private var _typePosX: String
Type of the horizontal position
private var _typePosY: String
Type of the vertical position
private var _align: String
The alignment of the LayoutItem
private var _disX: Number
Horizontal distance relative to its alignment
private var _disY: Number
Vertical distance relative to its alignment
private var _offsetX: Number
Distance from the registration point to the left corner of the movieclip linked with this LayoutItem
private var _offsetY: Number
Distance from the registration point to the top corner of the movieclip linked with this LayoutItem
private var _animated: Boolean
public function LayoutItem(id: String,
tgt: MovieClip,
typX: String,
typY: String,
align: String,
dx: Number,
dy: Number,
offx: Number,
offy: Number,
anim: Boolean)
Constructor Set all the properties of the LayoutItem
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.
private function horizontalUpdate(posxmng: Number,
/*posymng: Number,
*/ widthmng: Number/*,
heightmng: Number*/,
o: String):Number
Update the x position of the movieclip.
private function verticalUpdate(/*posxmng: Number,
*/ posymng: Number,
/*widthmng: Number,
*/ heightmng: Number,
o: String):Number
Update the y position of the movieclip.
public function destroy():Void
Destroy the movieclip reference and the LayoutItem object
This class manage all the system of Layers.
This class represents the layer created to linked LayoutItems to it.
This class stores the different values for the screen orientation.
This class stores the different values for the Layers and Items positions.
This class stores the different values for the type of the position, relative or absolute.