Webmaster

Tips
All Tips ]

Revolving titles

A fixed title is great. But a title that revolves is even better:

Enter the following script in the header of your page, between the tags <head> and </head>:

<SCRIPT>
<!--
var timer
function initiate() {
mytext1.Rotate(0,0,10)
timer=setTimeout("initiate()",20)}
// -->
</SCRIPT>

And this code between the <body> tags of </body>:

<body onLoad="initiate()">
<OBJECT id="montexte" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="POSITION:absolute;TOP:10px;LEFT:150px;WIDTH:400;HEIGHT:400">
<PARAM NAME="Line0001" VALUE="SetFillColor(255,0,0)">
<PARAM NAME="Line0002" VALUE="SetFont('Verdana', 25, 0, 0, 0, 0)">
<PARAM NAME="Line0003" VALUE="Text('My_Text', 0, 0, 0)">
</OBJECT>
</body>

  • SetFillColor(255,0,0) contains the colour in which the text will be displayed.

  • The three numbers correspond to the values for red, green and blue respectively.

  • SetFont('Verdana', 25, 0, 0, 0, 0)defines the font used for the text.

  • The values associated with this parameter determine the size of the text and whether it is bold, italic, underlined or crossed out, respectively.

  • Text('My_Text', 0, 0, 0) corresponds to the text itself.

  • The three values associated with this parameter correspond to the position of the text with regard to the point of rotation (horizontal, vertical, angle).

Compatibility. This tip uses an ActiveX control and only works with Internet Explorer.

Discover all Webmaster tips.