View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Peter Liscovius > SWF > SWF::DisplayItem



Annotate this POD


New  1
Open  0
View/Report Bugs


SWF::DisplayItem - SWF DisplayItem class


 use SWF::DisplayItem;


When you place an SWF object (one of the types that can be seen with eyes by user) in a frame of a SWF::Movie or SWF::movieClip, the return value will be in a SWF::DisplayItem.

You can now modify that item in current and every following frames of the clip where you added the SWF object.

Further it is accessible by ActionScript too. Just give the DisplayItem a name with method setName($name) after you added the SWF object to a SWF::Movie or SWF::MovieClip


$displayItem->moveTo($x, $y);

Move $displayItem to ($x, $y) in global co-ordinates.

$displayItem->move($x, $y);

Displace $displayItem by ($x, $y)

$displayItem->scaleTo($x [,$y]);

Set $displyItem scale to $x in the x-direction and $y in the y-direction. If $y is not specified, $y=$x is assumed.

$displayItem->scale($x [,$y]);

Multiply $displyItem scale by $x in the x-direction and $y in the y-direction. If $y is not specified, $y=$x is assumed.


Set $displayItem rotation to $degrees.


Rotate $displayItem by $degrees.


Add $x to the current x-skew.


Set x-skew to $x. 1.0 is 45-degree forward slant. More is more forwad while less is more backward.


Add $y to the current y-skew.


Set y-skew to $y. 1.0 is 45-degree upward slant. More is more upward while less is more downward.


Set Z-order of $displayItem to $depth.


Useful for SWF::Morph. Sets $displayItem ratio to $ratio.

$displayItem->addColor($r, $g, $b [,$a]);

Add RGB color to the $displayItem's color transform. Default value of $a is 1.0

$displayItem->multColor($r, $g, $b [,$a]);

Multiplies the $displayItem's color transform by the given values. Default value of $a is 1.0


Set $displayItem's name to $name (used for targetting with SWF::Action).


Remove $displayItem from the movie display list.

($x, $y) = $displayItem->getPosition(();

Returns displace coordinates of $displayitem.

$degrees = $displayItem->getRotation();

Returns rotation of $displayItem.

($x, $y) = $displayItem->getScale();

Returns scale of $displayItem in x- and y-direction.

($x, $y) = $displayItem->getSkew();

Returns x- and y-skew of $displayItem.

$depth = $displayItem->getDepth();

Returns Z-order of $displayItem.



Soheil Seyfaie (soheil AT Peter Liscovius


SWF, SWF::Button, SWF::Movie, SWF::MovieClip, SWF::Shape, SWF::Text, SWF::TextField

syntax highlighting: