The Marquee Control

The Marquee control is a special control that allows you to easily animate any web page. The Marquee control takes another HTML document as input and scrolls it inside the current document. This adds a "grand marquee" look to the page. Listing 4-7 shows two HTML documents. The first HTML document shows the implementation of the Marquee control and the reference to the HTML page to be scrolled. The second HTML document shows the actual code for the page to be scrolled. Figure 4-15 shows a sample of the output.

<HTML>
<HEAD>
<TITLE>Marquee Control</TITLE>
</HEAD>
<BODY>
<CENTER>

<OBJECT
    CLASSID="clsid:1A4DA620-6217-11CF-BE62-0080C72EDD2D"
    ID="objMarquee"
    ALIGN="CENTER"
    WIDTH=200 HEIGHT=250
    >
    <PARAM NAME="ScrollStyleX" VALUE="Circular">
    <PARAM NAME="ScrollStyleY" VALUE="Circular">
    <PARAM NAME="szURL" VALUE="scrollpg.htm">
    <PARAM NAME="ScrollDelay" VALUE=60>
    <PARAM NAME="LoopsX" VALUE=-1>
    <PARAM NAME="LoopsY" VALUE=-1>
    <PARAM NAME="ScrollPixelsX" VALUE=0>
    <PARAM NAME="ScrollPixelsY" VALUE=-3>
    <PARAM NAME="DrawImmediately" VALUE=0>
    <PARAM NAME="Whitespace" VALUE=0>
    <PARAM NAME="PageFlippingOn" VALUE=0>
    <PARAM NAME="Zoom" VALUE=100>
    <PARAM NAME="WidthOfPage" VALUE=200>
</OBJECT>

</CENTER>
</BODY>
</HTML> 

Listing 4-7.

The Marquee control used to scroll another HTML document within the current document.

<!--
Code for the scrolling page
-->

<HTML>
<HEAD>
<TITLE>Page to Scroll</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<CENTER>
<H2>Scrolling Text</H2>
<BR><BR>
Scrolling Image
<BR>
<IMG SRC="book.bmp">
<BR>
</CENTER>
</BODY>
</HTML> 

Figure 4-15.

Sample output of the Marquee control.

© 1996 by Scot Hillier. All rights reserved.