home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeDesigning Web AudioSearch this book

7.4. RealText

RealText is the markup language that defines how streaming text looks and operates within a G2 presentation. Because text files are typically small, streaming text consumes minimal bandwidth, usually less than 1 Kbps, and therefore has an almost negligible impact on the overall bitrate of a G2 show.

7.4.2. Window types

RealText files open and close with the <window> and </window> tags. The <window> tag must contain the type attribute, which designates the file as one of five preset types: generic, tickertape, marquee, scrollingnews, or teleprompter. Each type has preset parameters, as well as a number of attributes that can be applied to it, which define the appearance and functionality of the content. Within these parameters, you can define additional details such as font size and color:

  • A generic window has no preset parameters, and you can use it to create any RealText display allowed by the markup. You can display and erase lines of text, scroll text through the window, set text to crawl from side to side, or create a simple, static text box.

  • scrollingnews text is preset to scroll from the bottom of the window to the top, but it does not scroll from side to side. Scrolling occurs at a constant rate throughout the presentation.

  • Text in a tickertape window crawls from right to left and can also loop back around to the right. It cannot scroll up or down. The <tu> and <tl> tags describe the appearance and behavior of the text that appears in the upper and lower rows of the window, in the style of a stock ticker.

  • marquee text crawls from right to left and can loop, and it is centered vertically within the window.

  • In a teleprompter window, text arriving at the bottom edge of the window causes the text above it to move up just enough to display the new line.

The <window> tag also describes the height and width of the file. It's important to note that the height and width of the window must be the same as the height and width of the corresponding region in the SMIL file where your RealText file is being placed. If the dimensions are not exactly the same, the text will be distorted in the display.

Example 7-7 is a simple RealText file, using a scrollingnews window type. The <center> and <font> tags function the same way as they do in HTML.

RealText files can be more complex as well, with their own internal timelines. Example 7-8 contains the three captions that will appear beneath graphics consecutively in the same area, according to the indicated time settings.

Example 7-8. An example of captioned graphics

<window type="generic" width="200" height="20" duration="30">
<time begin="0.5" end="10"/>
<font face="arial" size="1">Graphic 1 caption</font>
<time begin="10.5" end="20"/>
<font face="arial" size="1">Graphic 2 caption</font>
<time begin="20.5" end="30"/>
<font face="arial" size="1">Graphic 3 caption</font>
</window>


Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.