Step
2 - Create the Data File
The
Advanced Scrolling Text applet reads all the text to
be displayed from a Plain Text File. If you look at
the applet parameters from the previous section you
will see that one of them is,
<param
name="dataURL" value="textdata.txt">
Please Note: File names are case sensitive ie.
"textdata.txt" is not the same as "TextData.txt".
This
specifies the name and location of the data file. In
this case the filename is 'textdata.txt' and is to be
found in the current directory (ie. that of your web
page).
To
create your data file, simply open up your favorite
text editor (eg. Notepad) and add the text you wish
to be displayed. Now save the file as 'textdata.txt'
in the same directory as your web page.
(If you choose to use a different filename or location
remember to change the 'dataURL' parameter to reflect
this.)
In
addition to plain text, the Advanced Scrolling Text
allows you to add to special functions to the text.
These are achieved by adding Special Instructions (Tags)
within the text file. The possible tags and there function
are as follows,
Hyper
Link - URL
You can add a link to a section of text or image by
enclosing within the tags <URL url,frame> and
</URL>.
Example
To have the words 'click here' link to the url http://www.jpowered.com/
you would add the following to the data file,
<URL
http://www.jpowered.com/>
click here
</URL>
Change
the Text Color
The tags <COLOR r,g,b> and </COLOR> allow
you to change the color of a section of text.
Example
To have the words 'For more Great Products' be displayed
in red you would add the following to the data file,
<COLOR
255,0,0>
For more Great Products
</COLOR>
Change
the Font
The tags <FONT face,style,size> and </FONT>
allow you to change the font of a section text.
Example
To have the text 'For more Great Products' displayed
with a font face of Courier, a Size of 14 point and
in Bold you would add the following,
<FONT
Courier,B,14>
For more Great Products
</FONT>
Center Text
The tags <CENTER> and </CENTER> allow you to specify that a portion of text should be centered. Any text surrounded
by the <CENTER> and </CENTER> tags will centered in the display area.
Change the Indent
Each line of Text will automatically be indented by the default indent specified in the applet parameters. However you can override
this for a section of text with the tags <INDENT nPixs> and </INDENT>
Example
To have the text 'For more Great Products' indented
by 50 pixels you would add the following,
<INDENT
50>
For more Great Products
</INDENT>
Insert
a Line Break
By default the Advanced Scrolling Text will start a
new line at the end of each line of text in the data
file. However you can force a new line at any point
by inserting the tag <LINEBREAK>
Insert
a Page Break
By default the Advanced Scrolling Text will start a
new page when the current page is full. However you
can force a new page at any point by inserting the tag
<PAGEBREAK>
Change
the Pause time for a Page
At the end of a page the scrolling will be automatically
paused by the amount of time specified in the applet
parameter 'PagePause'. However you can specify a different
pause time for any page by using the tag <PAUSE time>.
Example
To have scrolling paused from 5 seconds at the end
of the current page you would insert the following,
<PAUSE
5>
Add
an Image
In addition to displaying text and Image can be added
to the display at any point by using the <IMG imageURL>
tag.
Example
To have the image 'button.gif' displayed you would
insert the following tag,
<IMAGE
button.gif>
To see each of these tags being used with a real data
file please take a look at the examples - click
here.
Next
Step - Upload to Web Server >>
|