This following examples show how to create and tag the supported RealText window types.
The following example illustrates a RealText source document and resulting display for a generic RealText window. This is the RealText source file (extension .rt):
<window duration="30" bgcolor="yellow">
Mary had a little lamb,
<br/><time begin="3"/>little lamb,
<br/><time begin="6"/>little lamb.
<br/><time begin="9"/>Mary had a little lamb,
<br/><time begin="12"/>whose fleece was white as snow.
<br/><time begin="15"/><clear/>Everywhere that Mary went,
<br/><time begin="18"/>Mary went,
<br/><time begin="21"/>Mary went,
<br/><time begin="24"/>Everywhere that Mary went,
<br/><time begin="27"/>That lamb was sure to go.
</window>
When RealPlayer processes this file, it displays only the first line of the text from zero to three seconds into the stream:
Every three seconds after the first line displays, a new line appears as specified by <time begin="
seconds
"/>
. At 15 seconds, <clear/>
clears the displayed text and resets the text "cursor" to the top, left-hand corner of the window. When the stream finishes, all lines of text following the last <clear/>
tag appear in the window:
If you have RealPlayer G2 installed, you can click here to display this example. Note the following about this example:
<window>
tag, word wrapping defaults to true. However, word wrapping is not necessary because <br/>
tags force line breaks.
<time/>
tags need not appear after a <br/>
tag. They can appear anywhere in the text.
<time end="
time
"/>
tags to make individual lines of text disappear before the <clear/>
tag cleared all the lines.
The following example shows the RealText source document and resulting display for a TickerTape window. This is the RealText (.rt) source file:
<window type="tickertape" duration="1:00" width="350" loop="true" underline_hyperlinks="false" link="white">
<br/><b>
<tu><a href="http://www.dowjones.com/">DJIA</a></tu>
<tl>7168.35 +36.52 </tl>
<tu>NIKEI 225 Index</tu>
<tl>20603.71 +203.11</tl>
</b>
</window>
This source file produces the following window in RealPlayer.
If you have RealPlayer G2 installed, you can click here to display this example. Note the following about this example:
<b>
tag at the start bolds all following text.
<a href="http://www.dowjones.com/">DJIA</a>
makes DJIA
a hyperlink that, when clicked, opens a browser to http://www.dowjones.com/.
DJIA
is not underlined because underline_hyperlinks="false"
is declared in the <window>
tag. It is drawn in white because link="white"
is also in the <window>
tag.
loop="true"
in the <window>
tag means the text loops around and comes back in from the right side of the window as soon as the last character of the text has moved completely out of the window. It is not necessary to specify this attribute explicitly, because in TickerTape windows loop="true"
is the default.
<br/>
tag that comes before the first text item forces the text that follows to start just past the window's right edge. Any break or paragraph tag inside TickerTape text causes the text that follows to start at the right edge. If the <br/>
tag were absent, the data would appear starting at the window's left edge.
The following example demonstrates a ScrollingNews window. This is the RealText (.rt) source file:
<window type="scrollingnews" duration="10" bgcolor="aqua">
<br/><br/>News for Monday, March 3rd, 1997:
<br/><b><u>Top Stories:</u></b>
<p>Top government official accused of working overtime. Hearings begin on Thursday.</p>
<time begin="1"/>Canine serial killer put to sleep in Virginia.
<p>Death rate highest among those who don't breathe, study finds.</p>
</window>
This source file produces the following window in RealPlayer. If you have RealPlayer G2 installed, you can click here to display this example.
The example above shows what the text box looks like 1.5 seconds into the presentation. The text window and text appear at the 0,0 (top left) coordinates on the screen. At one second into the stream, the second and third items appear as specified in the <time begin="1"/>
tag.
Note that the second item becomes visible after it scrolls into the window. This demonstrates how you can control the visibility of text with the <time/>
tag. Without the <time/>
tag, the text would have appeared before one second and would have scrolled up from the bottom of the window.
The following example demonstrates a TelePrompter window. This is the RealText (.rt) source file:
<window type="teleprompter" height="60" duration="25" bgcolor="lime" wordwrap="false">
Out, out, brief candle!
<br/><time begin="3.5"/>Life's but a walking shadow, a poor player
<br/><time begin="7"/>That struts
<time begin="8"/>and frets
<time begin="9"/>his hour upon the stage
<br/><time begin="12"/>And then is heard no more:
<time begin="15"/>it is a tale
<br/><time begin="16"/>Told by an idiot,
<time begin="17.5"/>full of sound and fury,
<br/><time begin="20"/>Signifying
<time begin="22"/><font color="red">nothing.</font>
</window>
When the window fills with text and a new line appears, all lines scroll up to make room for the new line. The following illustrates the window when the presentation ends. If you have RealPlayer G2 installed, you can click here to display this example.
Note the following about TelePrompter windows:
wordwrap
attribute can be true
or false
.
scrollrate
and crawlrate
attributes are ignored.
<clear/>
tag to clear the window and start the next line at the window's upper, left-hand corner.
<time begin/>
tags at the start of each line and do not let word wrapping cause too many line breaks between <time/>
tags.