Kinesis SoftwareKineticFusion

[Show Table of Contents]

8 Working With RVML Documents

[Hide Table of Contents]



8.1.2 RVML Symbols

This sections outlines the different types of displayable RVML symbols. All RVML symbols can have optional metadata associated with them. This metadata can be used for several purposes:

The following RVML metadata elements are current permitted:

8.1.2.1 Shape

A Shape symbol defines an SWF vector shape symbol. These are the most basic components of all SWF graphics. A Shape symbol is represented by the RVML Shape element.

The Shape symbol contains at least one style table for the styles used in rendering the drawing operations. A style table should contain a list of all line styles used in drawing the graphic, and a list of all fill styles used in drawing the graphic. In addition to representing the set of styles supported by the SWF format KineticFusion also allow specification of dashed line styles.

Once the style table is defined, the remainder of the Shape symbol definition defines the drawing operations and style changes for the shape. KineticFusion augments the native SWF drawing primitives with new higher-level drawing operations that are automatically compiled down to the SWF primitives. These full set of drawing operations supported in RVML are:

The style settings for the current drawing operation can be changed at any time by preceding the operation with a SetStyle element that updates the current line style, the main fill, and the secondary fill. These styles are specified using indexes into the corresponding style table. Style indexes begin at 1 so to disable a style the style index can set to zero.

8.1.2.2 ImageShape

Within SWFs, the only way to display an embedded image resource is to define it as a fill style for a Shape symbol, and then draw a rectangle that matches the bounds of the image. To simplify the displaying of images within RVML, a new ImageShape symbol was created that automatically creates a Shape symbol that is sized to the exact dimensions of the specified image resource. This is represented by an RVML ImageShape element.

8.1.2.3 MorphShape

A MorphShape symbol is a 'tweened' symbol that represents the intermediate shape resulting from the interpolation of two inline vector shapes, each with an equal number of vertex points and styles. The actual symbol that is displayed at any time depends on a specified 'ratio' attribute that is used with the display operation. A ratio value of 0 displays the first vector shape; a ratio value 0f 65555 displays the second shape. All intermediate values will display the corresponding 'tweened' shape.

The MorphShape symbol is represented by the RVML MorphShape element. The definition of the MorphShape symbol in RVML specifies inline the styles of the first shape and corresponding styles of the second shape, followed by the vector operations for the first shape followed by the vector operations of the second shape. Style changes are only allowed on the first shape as it is necessary, when performing the interpolation, that style changes occur at the same vertices on both shapes.

8.1.2.4 Button

The Button symbol allows users to statically define an SWF button symbol that provides interaction with the mouse and is represented by the RVML Button element. A Button symbol is defined in terms of Layer elements. Each Layer element defines a single symbol that is displayed in the button, the Z-Order depth at which the symbol resides, and the button states in which the symbol is used.

Button symbols can also have sounds associated with one or more state transitions such Press or Release using the ButtonSound element.

Button behaviours are defined using a ButtonActions element that define the ActionScript event handlers implementing the button interactions. All event handlers must take the form:

on ( <ButtonEvent>)
{
     // ActionScript event handling code here
}

Where ButtonEvent is one of:

8.1.2.5 MovieClip

A MovieClip symbol acts as a container for other symbols that can include animations and scripting elements. Additionally, a movie clip can act as a generic button-style object once Button event handlers are assigned to it (typically the graphical state of the button is reflected by separate MovieClip frames with the even handler movie the current frame pointer).

The MovieClip symbol is represented in RVML by the MovieClip element can contains only a single timeline. It is also possible to associated InitClip actions with a MovieClip - these actions are defined in the InitClipActions movie element or inline using the InitActions element.

8.1.2.6 EditField and Text Symbols

There are two symbols for representing text in RVML: the EditField symbol for dynamic and HTML text, and the Text symbol for static text that is pre-positioned. For more information on text handling see the KineticFusion Text Handling Features section.