SWFDisplayItem

Here's where all the animation takes place. After you define a shape, a text object, a sprite, or a button, you add it to the movie, then use the returned handle to move, rotate, scale, or skew the thing.


$i->moveTo($x, $y);
i.moveTo(x, y)
i->moveTo(x, y);
SWFDisplayItem_moveTo(i, x, y);

Move object to (x,y) in global coordinates.


$i->move($x, $y);
i.move(x, y)
i->move(x, y);
SWFDisplayItem_move(i, x, y);
Displace object by (x,y) in global coordinates.


$i->scaleTo($x, $y);
i.scaleTo(x, y)
i->scaleTo(x, y);
SWFDisplayItem_scaleTo(i, x, y);
Set scale to x in the x-direction, y in the y-direction.


$i->scale($x, $y);
i.scale(x, y)
i->scale(x, y);
SWFDisplayItem_scale(i, x, y);
Multiply scale by x in the x-direction, y in the y-direction.


$i->rotateTo($degrees);
i.rotateTo(degrees)
i->rotateTo(degrees);
SWFDisplayItem_rotateTo(i, degrees);
Set rotation to degrees degrees.


$i->rotate($degrees);
i.rotate(degrees)
i->rotate(degrees);
SWFDisplayItem_rotate(i, degrees);
Rotate by degrees degrees.


$i->skewXTo($x);
i.skewXTo(x)
i->skewXTo(x);
SWFDisplayItem_skewXTo(i, x);
Set x-skew x. 1.0 is a 45-degree forward slant. More is more forward, less is more backward.


$i->skewX($x);
i.skewX(x)
i->skewX(x);
SWFDisplayItem_skewX(i, x);
Add x to current x-skew.


$i->skewYTo($x);
i.skewYTo(x)
i->skewYTo(x);
SWFDisplayItem_skewYTo(i, x);
Set/add y-skew y. 1.0 is a 45-degree upward slant. More is more upward, less is more downward.


$i->skewY($x);
i.skewY(x)
i->skewY(x);
SWFDisplayItem_skewY(i, x);
Set/add y-skew y. 1.0 is a 45-degree upward slant. More is more upward, less is more downward.


$i->setDepth($depth);
i.setDepth(depth)
i->setDepth(depth);
SWFDisplayItem_setDepth(i, depth);
Set z-order to depth. Depth defaults to the order in which instances are created (by add'ing a shape/text to a movie)- newer ones are on top of older ones. If two objects are given the same depth, only the later-defined one can be moved.


$i->remove();
i.remove()
i->remove();
SWFDisplayItem_remove(i);
Remove this object from the movie's display list.


$i->setName($name);
i.setName(name)
i->setName(name);
SWFDisplayItem_setName(i, name);
Set the object's name to name, for targetting with action script. Only useful on sprites.


$i->setRatio($ratio);
i.setRatio(ratio)
i->setRatio(ratio);
SWFDisplayItem_setRatio(i, ratio);
Set the object's ratio to ratio. Obviously only useful for morphs.


$i->addColor($r, $g, $b [, $a]);
i.addColor(r, g, b [, a])
i->addColor(r, g, b [, a]);
SWFDisplayItem_addColor(i, r, g, b, a);
Adds the given color to this item's color transform.


$i->multColor($r, $g, $b [, $a]);
i.multColor(r, g, b [, a])
i->multColor(r, g, b [, a]);
SWFDisplayItem_multColor(i, r, g, b, a);
Multiplies the item's color transform by the given values.


Animation example
Color transform example

back to index


All content Copyright (C) 2000-2002 Opaque Industries except where noted otherwise.