(Tutorial courtesy of Roma, aka Klimt)
Many years ago, Microsoft introduced an HTML extension for their IE browser named <marquee>. The purpose of this extension was to allow any object placed between the tags to scroll on the page in a manner similar to a movie marquee. While this extension is not part of the W3C standard, all the major browsers (IE, Firefox, Opera, Safari, and now Chrome) provide support for the tag. The good thing about this tag is that it does not require javascript to execute; the scrolling is performed completely by the browser itself.
Using the <marquee> tag in SiteSpinner fairly simple. If you want to scroll text, then the easiest method is to use a text object and wrap the text inside the <marquee> and </marquee> tags: e.g.,
<marquee>This is an example of marquee text</marquee>
Since this method requires embedding HTML codes inside the text object, you will need to disable the filters that inhibit using HTML codes (see Mixing Text and Code). Using a text object allows you to format the text as you wish (type face, size and color) without using extra style codes a code object would require. For example, the above example with text formatted using Verdana font, 14-pt, bold, italic, centered, background shading applied, and the text object width adjusted to 300-pixels would appear as:
If you use a code object to hold your marquee code, remember that the text will assume the default formatting you have set via the Page Editor?Links, Fonts in the Character Set and Default Font section. This is also the default font used for forms in your project, so be careful making changes.
The <marquee> tag has several options (attributes) that can control how the marquee will appear:
| width | Sets the width of the marquee area. The default is 100%. In SiteSpinner, the 100% width will make the marquee as wide as either the text or code object holding the code. This allows you to control the marquee width by resizing the SiteSpinner object. The value is assumed to be in pixels so do not add a units type. |
| height | Sets the height of the marquee area. The default is set by the browser to fit what object(s) the marquee holds. This attribute is only useful if the marquee is set to scroll vertically. The value is assumed to be in pixels so do not add a units type. |
| direction | Sets the direction which the marquee will scroll. Possible values are: left, right, up, and down. If the up or down direction is used, the height value defaults to 200. |
| behavior | Set the type of marquee. Possible values are:
|
| scrolldelay | The marquee effect is achieved by moving the object, pausing, then moving it again. This attribute sets the pause time between the movements. The value sets the delay in milliseconds; the default is 85. |
| scrollamount | The attribute sets the amount of movement made when the object shifts its position. The value represents the number of pixels used by each shift; the default is 6. |
| loop | The marquee contents will continuously shift using the values set by the direction and behavior attributes. If you want to limit the number of times the contents will shift, set this attribute value to the desired number of loops. When the loop value is used with the scroll behavior, the contents of the marquee will disappear after the last loop is reached. If you want to keep the marquee contents visible after the last loop, use the slide or alternate behavior. |
| bgcolor | This attribute is used to set the background color of the marquee area which is defined by the width and height attributes, not by the width and height of the SiteSpinner object. Because the SiteSpinner object will have dimensions than the marquee area, you should use this attribute instead of using the Shading Editor. You can use either a well-known HTML color name or the HTML hex-digit code when specifying this value. |
| hspace | This is used to specify the amount of horizontal space to be used on the left and right edges on the marquee area. The value is applied to the outside of the marquee area. The default is 0. |
| vspace | This is used to specify the amount of vertical space to be used on the top and bottom edges on the marquee area. The value is applied to the outside of the marquee area. The default is 0. |
Contact the LowTechGeezer
VM User's Forum
Bruceee's Sandpit
Webmaster's Corner
Other Useful Sites