show Element

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, sprite, morph

Syntax

<show objectId="objectId" id="showId" [moveX="xSift"] [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"]
/>

Attributes

Name

Description

Value type

Optional

Default Value

objectId

Identifier of object described in objects collection to be shown.

id

no

-

showId

Identifier, which will be assigned to the displayed instance of the object.

id

yes

-

moveX

Relative shift of the object in the X coordinate (can be negative as well).

coordinate

yes

-

moveY

Relative shift of the object in the Y coordinate (can be negative as well).

coordinate

yes

-

rotate

Rotation of the object in degrees. If rotateCenterX and rotateCenterY are not specified, the object will be rotated around its center.

float

yes

-

rotateCenterX

X coordinate of the object rotation center.

coordinate

yes

-

rotateCenterY

Y coordinate of the object rotation center.

coordinate

yes

-

scaleX

Scaling coefficient of the object in the X coordinate.

float

yes

-

scaleY

Scaling coefficient of the object in the Y coordinate.

float

yes

-

skewX

Defines object skew along X axis.

float

yes

-

skewY

Defines object skew along Y axis.

float

yes

-

morphPhase

First animation phase (of 65535) to be shown.

Ignored for all objects except morph.

integer

yes

0

morphFrames

Number of frames to be generated in tweened animation using 65535 animations phases.

Ignored for all objects except morph.

integer

yes

-

maskId

Identifier (showId) of mask object show tag.

id

yes

-

shiftAlpha

Shift for original shape transparency. Value may be positive or negative from -255 to 255.

integer

yes

-

shiftRed

Shift for Red part of original shape color. Value may be positive or negative from -255 to 255.

integer

yes

-

shiftGreen

Shift for Green part of original shape color. Value may be positive or negative from -255 to 255.

integer

yes

-

shiftBlue

Shift for Blue part of original shape color. Value may be positive or negative from -255 to 255.

integer

yes

-

transform

This attribute allows to transform original shape defined in objects collection using script-style transformation notation.

transform

yes

-

Remarks

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 maskIdattribute 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.

Parent Elements

frame element

See Also

XML Schema Reference