Previous Element | Next Element |
Replace
This element replaces the symbol at the specified depth with
a new instance of a symbol of the specified type and is the
equivalent of a Remove element followed by a Place element
with optional transformations. This element will only
replace Shape, MorphShape and Text elements. Any other
element is ignored. The new symbol will inherit the
clipDepth and ratio attributes and Transform and
RGBAColorTransform elements that were defined for the
replaced symbol unless otherwise specified.
Replace elements can also take basic transformation
attributes. These, in general, should be used in preference
to a nested Transform element in situations where the
referenced symbol is already defined and the bounds are
known. The location of the referenced symbol can be modified
with the x and y attributes, the scale of the symbol can be
modified using the width and height attributes, and the
rotation of the symbol modified using the rotate attribute.
Note that when the width and height attributes are used for
compound symbols such as MovieClips and Buttons, their
bounds are calculated by summing the bounds of all symbols
on their timeline or, in the case of buttons, their hit
areas.
If it is necessary to specify skew attributes using
differing values for rotateX and rotateY, or if it is
preferred to specify an absolute transform independent of
the new symbol, then the nested Transform element can be
used
Attributes
name | The id of the symbol to place on the timeline. | |
Type | String | |
depth | This is the depth at which to replace an existing instance with this instance of the symbol. | |
Type | Integer | |
From Value | 1 | |
To Value | 65535 | |
instanceName | Optional name used to refer to the instance from ActionScript. | |
Type | String | |
tabIndex | Optional attribute specifying a tab index for the symbol. Tab indices are used by screen readers and provide a means to signal that the current symbol has content that is renderable by such a reader. | |
Type | Integer | |
From Value | 0 | |
To Value | 65535 | |
ratio | Optional attribute used for MorphShapes.This refers to the degree of interpolation between the FromShape and the ToShape. A value of 0 displays the FromShape, a value of 65535 displays the ToShape and all values in between result in an interpolation between the two in direct proportion to the ratio. | |
Type | Integer | |
From Value | 1 | |
To Value | 65535 | |
x | X position for specified symbol. Moves the origin of the symbol to the specified X coordinate. | |
Type | Float | |
Default Value | 0 | |
y | Y position for specified symbol. Moves the origin of the symbol to the specified Y coordinate. | |
Type | Float | |
Default Value | 0 | |
width | The new width of the symbol. The symbol width is independent of the coordinate system of the symbol being altered. In order for this attribute to be specified, the symbol must already be defined in RVML, and it cannot have a width of zero. | |
Type | Float | |
Default Value | Width of existing symbol | |
height | The new height of the symbol. The symbol height is independent of the coordinate system of the symbol being altered. In order for this attribute to be specified, the symbol must already be defined in RVML, and it cannot have a height of zero. | |
Type | Float | |
Default Value | Height of existing symbol | |
rotate | Rotation in degrees about the origin of the shape, applied before the application of the x and y attribute definitions, if specified. | |
Type | Float | |
Default Value | 0 | |
blend | Flash 8 introduced blending of multiple overlapping symbols on a stage. There are 14 different blend types supported. Blends remain applied to a symbol instance until explicitly reset. To remove a previously applied blend mode, the blend value should be set to 'normal'. | |
Values | normal layer multiply screen lighten darken difference add subtract invert alpha erase overlay hardlight | |
cacheAsBitmap | Flash 8 introduced a new setting for indicating that a MovieClip or Button placed on the timeline should be converted to a bitmap for faster rendering. This enables the Flash player to optimize the rendering of display objects that are frequently redrawn on the stage. | |
Values |
| |
Default Value | no |
Child Elements
TransformRGBAColorTransform
Filters
Parent Elements
FrameExamples
Timeline Replace ExamplesAnimate simple symbols on timeline
Color Gradient Examples
Previous Element | Next Element |