The show element displays on screen an object specified in the objects collection. The new object can also be moved, rotated, or scaled, similar to the modifications described by the modify element. The following elements may be shown with the show tag:
rectangle, polygon, circle, arc, oval, square, shape, text, htmlText, sound, button, image, video, sprite, morph
<show objectId="objectId" id="showId" [moveX="xShift"] [moveY="yShift"]
[rotate="rotationAngle"]
[rotateCenterX="rotationCenterX" rotateCenterY="rotationCenterY"]
[scaleX="xScale"] [scaleY="yScale"] [skewX="xSkew"] [skewY="ySkew"]
[morphPhase="frameNumber"] [morphFrames="numberOfFrames"]
[maskId="showId"] [shiftAlpha="shiftForAlpha"]
[shiftRed="shiftForRed"] [shiftGreen="shiftForGreen"] [shiftBlue="shiftForBlue"]
[transform="transformScript"] [directTransform="useDirectTransformMatrix"]
/>
Name |
Description |
Value type |
Optional |
Default Value |
objectId |
Identifier of object described in objects collection to be shown. |
no |
- |
|
showId |
Identifier, which will be assigned to the displayed instance of the object. If specified, object being shown will be accessible from ActionScript and showId attribute value will identify object (movie clip or text field) in Flash Player display object hierarchy. Additionally, object can be used via actionSetTarget element. |
yes |
- |
|
moveX |
Relative shift of the object in the X coordinate (can be negative as well). |
yes |
- |
|
moveY |
Relative shift of the object in the Y coordinate (can be negative as well). |
yes |
- |
|
rotate |
Rotation of the object in degrees. If rotateCenterX and rotateCenterY are not specified, the object will be rotated around its center. |
yes |
- |
|
rotateCenterX |
X coordinate of the object rotation center. |
yes |
- |
|
rotateCenterY |
Y coordinate of the object rotation center. |
yes |
- |
|
scaleX |
Scaling coefficient of the object in the X coordinate. |
yes |
- |
|
scaleY |
Scaling coefficient of the object in the Y coordinate. |
yes |
- |
|
skewX |
Defines object skew along X axis. |
yes |
- |
|
skewY |
Defines object skew along Y axis. |
yes |
- |
|
morphPhase |
First animation phase (of 65535) to be shown. |
yes |
0 |
|
morphFrames |
Number of frames to be generated in tweened animation using 65535 animations phases. |
yes |
- |
|
maskId |
Identifier (showId) of mask object show tag. |
yes |
- |
|
shiftAlpha |
Shift for original shape transparency. Value may be positive or negative from -255 to 255. |
yes |
- |
|
shiftRed |
Shift for Red part of original shape color. Value may be positive or negative from -255 to 255. |
yes |
- |
|
shiftGreen |
Shift for Green part of original shape color. Value may be positive or negative from -255 to 255. |
yes |
- |
|
shiftBlue |
Shift for Blue part of original shape color. Value may be positive or negative from -255 to 255. |
yes |
- |
|
transform |
This attribute allows to transform original shape defined in objects collection using script-style transformation notation. |
yes |
- |
|
directTransform |
If set to true, ActiveSWF will build and apply 2D matrix transformation to the shape. Look at Direct matrix transformations section for more details. |
yes |
false |
Tweened animations
Morph element has 65535 animation phases. You may start showing from particular frame using morphPhase attribute of show tag. It defines what is first phase of 65535 to be shown.
With morphFrames attribute of show tag you may define
number of frames to be generated in tweened animation using source 65535 animations phases.
For example, if you specify morphFrames="6", the following animation phases
will be used by ActiveSWF core for frames generation: 0,13107,26214,39321,52428,65535.
Color and Alpha shifts
When we use shiftAlpha, shiftRed, shiftGreen
and shiftBlue attributes of show tag, ActiveSWF core strips
negative and positive overflow. Resulting R/G/B or alpha values of a shape shown are limited
by range from 0 to 255.
Ex. Shape has solid fill with "#7F0000" color. Current decimal red color value is 127 (7F in hex),
after we apply a shift of 200 to red color, it's value become 255 (FF in hex), not 327.
Shape will be displayed "#FF0000" fill color.
Masking
With maskId attribute of show tag you may define a shape which is a mask for object you are showing with current show tag. It is assumed mask object was shown before. All objects showed between show of mask object and current show with maskId attribute will be masked.
Direct matrix transformations
When directTransform attribute of show, modify or replace tag is set to true, ActiveSWF builds and applies the following 2D matrix transformation to the shape:
| scaleX skewY moveX |
| skewX scaleY moveY |
For any shape coordinates (x, y), the transformed coordinates (X, Y) are calculated as follows:
X = x * scaleX + y * skewY + moveX
Y = x * skewX + y * scaleY + moveY
rotate, rotateCenterX, rotateCenterY and transform attributes are ignored in this case.
frame element