Kinesis SoftwareKineticFusion

[Show Table of Contents]

10 RVML Reference

[Hide Table of Contents]

10.3 RVML Examples

ADPCM Sound Example
Loads in an ADPCM sound, stored in an SWF movie, from an absolute file location and plays the sound once on the main timeline.
Simple MP3 Sound Example
Loads in an external MP3 sound and plays it once on entry to the main timeline
ActionScriptSettings Example
Illustrates how to use customize the ActionScript settings for a particular movie.
Animate simple symbols on timeline
Illustrates the simple animation of Shape symbols. Places a symbol on the stage and animates it in successive frames using the Alter element to define new Transform elements. The difference in behavior when the origin of the shape is not at (0,0) is illustrated using two different shape symbols. All transformation stages are annotated using a dynamic EditField symbol.
Button Example
Illustrates the definition of a Button symbol. Creates two buttons with differing dragTarget attributes and illustrates the behavioral differences on mouse events. A simple ActionScript event handler is used to alter the timeline position when a button is pressed.
Button DragTarget Example
Illustrates the difference in behavior between a button with the dragTarget attribute enabled and a button with the dragTarget attribute disabled.
Button Sound Example
Illustrates how sounds can be associated with each button state and how the properties of the sounds can be manipulated with SoundInfo elements.
CArcs Example
Illustrates how to draw circular arcs using different formats of the CArc element.
Circle Examples
Illustrates the specification of circles and losses in accuracy when scaling extremely small circles.
Example Of MovieClip classes
Illustrated how to associate a MovieClip symbol with an ActionScript class that can be scripted. Two MovieClips are placed on the timeline but with different initial properties so that the first clip is rendered horizontally and the second vertically.
Example Of MovieClip classes and scripted animations
Illustrated how to associate a MovieClip symbol with an ActionScript class that can be scripted. Two MovieClips are placed on the timeline but with different initializers so that the first clip is rendered horizontally and the second vertically. The position of each movie clip is altered using a MovieClip ActionScript event handler.
Color Specification Example
Illustrate how to specify colors in RVML using a simple circle. This example also highlights the effect of the opacity attribute. Colors are specified using standard SVG color names(e.g.'red'), SVG color constants (e.g. '#ff0000'), rgb tuples (e.g. 'rgb( 255, 0, 0)'), or rgba tuples (e.g. 'rgba( 255, 0, 0, 255)').
Timeline Color Transformations
Illustrates how to change the color properties of any symbol when placing or altering the symbol on a timeline.
Quadratic Curve Example
Illustrates how to specify a quadratic curve and the influence of control points on the curve.
Elliptical Arcs Example
Illustrates the many ways in which elliptical arcs can be specified and how the arc properties determine which of four possible arcs is rendered.
Examples of Elliptical Arcs and Circular Arcs
Illustrates various approaches for specifying arcs and the differences between EArcs and CArcs.
SVG Arc Example in RVML
Illustrates how a basic SVG shape can be represented in RVML. All styles are moved to the style declaration section and each path element is preceded by the appropriate style settings. The size of the resulting shape is rescaled to 50% using a ShapeTransform element.
EditField Examples
Illustrates the EditField symbol and provides examples demonstrating the use of the EditField general attributes and the EditField properties attribute.
EditField Transformations
Illustrates the effect of Timeline transformations on EditFields and provides an example of how EditFields with system-defined fonts cannot be rotated.
Defines simple symbol for export
Illustrates how to export a movie symbol so it may be imported at runtime by another movie.
Raw MP3 Example
Loads in an MP3 sound, stored in an external MP3 file, from a file repository and plays the sound once on the main timeline.
Flash 8 Filter Examples
Illustrates how the 7 different timeline filters are defined in RVML
Font Manipulation Examples
Illustrates how font resource definitions can be optimized for the purpose of restricting input to limited glyphs and how to implement similar functionality in ActionScript.
HTML Support in EditFields
Illustrates how to use both static and dynamic HTML in EditFields. Non-system fonts can also be used as HTML fonts however they must be explicitly included in the output movie using the forceOutput attribute and all fonts specified in the HTML override the default font resource assigned to the EditField.
Font Range Examples
Illustrates how the output set of characters in an embedded font can be specified using the fontRange attribute on both font resources and EditField symbols.
ActionScript on the Timeline
Illustrates how to define global functions on the timeline and the scope of global functions. The cube() function defined in frame 3 is unavailable when the timeline first reached frame 2 however once it has been defined in frame 3 it becomes available in frame 2 in the next iteration.
Color Gradient Examples
Illustrates the definition of linear color gradients and radial color gradients. A simple mouse event handler will catch all mouseDown events to toggle between the two gradient types.
ImageFill Examples
Illustrates how raster images can be used as fills in Shape symbols. The top-left fill is the standard fill type where the image is larger than the fill area and is truncated. The image in the top-right fill is scaled to 20% of original size and clipped. All colors on the image border are duplicated to the edge of the fill area. The bottom-left image is rotated by 90 degrees clockwise. The bottom-right image is scaled to 20% of original size and tiles the complete fill area.
ImageShape Example
Illustrated how a shape can be created with the exact dimensions of the Image resource. The movie also has a sizeShape attribute indicating that the dimensions of the output movie should match the dimensions of the specified shape.
Import and Export a Symbol
Illustrates how to import and use a symbol at runtime from another movie. The imported symbol is made available to other movies by exporting it.
Importing symbols at runtime
Illustrates how multiple symbols can be imported from different movies at runtime.
Line Style Z-Ordering
Illustrates the z-ordering behavior of LineStyles. Styles with a higher index will always be drawn on top of styles with a lower index, regardless of drawing order.
Line Style and Scaling
Illustrates specifying dashed line attributes and the maximum sensitivity of line widths, regardless of scale. To visibly differentiate between two different line widths, they must differ by at least 0.04 pixels.
MorphShape Example
Illustrates a simple MorphShape. The FromShape and ToShape differ only in position and the contents of their color gradients.
Dynamic MovieClip Clipping
Uses an animated movie clip to mask an underlying polygon. The MovieClip is moved dynamically every frame using a MovieClip event handler. A line frame is associated with the clip to indicate its shape and position.
Polygon Example
Illustrates a shape containing a simple polygon.
Simple Polyline Example
Illustrates a shape consisting of a simple polyline.
Rectangle Example
Illustrates the specification of Rect drawing operations. Each Rect element has differing rounded corner specifications.
Timeline Replace Examples
Illustrates the contexts in which the Replace timeline element may be used instead of using a Remove followed by Place. Replace can be used with Text symbols, Shape Symbols and MorphShape symbols and will keep the timeline properties of the symbol being replaced unless explicitly overridden. Hence clipping regions defined for a symbol will be maintained by any replacing symbol and morph shapes will inherit the same ratio attribute value.
Text Segments Example
Illustrate the options for creating static text symbols composed of text segments. The first line shows the automatic spacing and alignment options for text segments. The second shows a segment with all spacing and alignment explicitly specified. The overlapping text uses a segment with built in rotation superimposed with a Text symbol that is rotated on the main timeline.
Shape Fill Examples
Illustrates the options available when specifying fills for shapes. In the first 2 examples we see that, by default, line styles have a higher z-order than fill styles. Fill styles with a higher index will be drawn over those fill areas with a lower index. In the third example, we see that in order for a fill style to have a higher z-order than a line style, it must be declared in a newer style table. As the SWF format permits lines to specify fills on both sides of the line, in the lower three examples we illustrate how the previous examples can be optimized to attain the same effects.
Shape Origin Example
Illustrates how shapes can be anchored relative to their bounding rectangle, and the basic primitives for altering the position of the bounding rectangle. In the red example, the shape has the default anchor position on the top-left corner. The green example translates the bounding rectangle to 500, 0) and uses the top-right corner as the origin. The blue example translates the bounding rectangle to (0, 500) and uses the bottom-left corner as the origin. The yellow example translates the bounding rectangle to (500, 500) and uses the bottom-right corner as the origin. The pink example translates the bounding rectangle to (250, 250) and uses the center of the bounding rectangle as the origin.
Shape Transform Examples
Illustrates how to create shape components using static transformations. The small crescent image is rotated and translated across the shape using a sequence of nested ShapeTransform elements.
Sound Envelope Example
Illustrates how a simple sound can be altered. In this example, the right volume is reduced to 0 over the first 500 ms, then swapped with the left channel over the next 1000ms and then finally the left channel increased to 50% volume and the right channel decreased to 50% volume prior to completion.
Square to Circle Morph Example
Illustrates the right and wrong may to morph from one shape into another. In the first example, the starting points and directions of both shapes are the same. This allows all edges to morph with their closest counterpart in the other shape. In the second example, the edges of the FromShape are not specified in contiguous order and the morphing process cannot correctly perform a smooth morph.
Clipping and Text Clipping Example
Illustrates how text segments can be use as a clipping mask on a timeline. In this example a polygon with a radial gradient is clipped by a text segment.
Simple MP3 Sound From URL Example
Loads in an external MP3 sound from a specified URL and plays it once on entry to the main Timeline.
User-Defined Font Example
Illustrates how to create a user-defined font definition. This example creates a font and uses it to define a static text field and a dynamic input field.
Video Example
Illustrates how to embed a video resource in an SWF movie.