FLASH NEWS SCROLLER
by Vevs.com: Design & Development
official web site:
http://www.vevs.com/flashnews

Chapter 1   Chapter 2   Chapter 3

Chapter 3: Editing your FNS configuration file.

Important: Do not change the contents of your configuration file if you don't have enough experience in editing settings stored in a text formatted file.

Your FNS settings are stored in a file with INF extension. All the properties which the "Settings Editor" (wizard) generates are stored in variables in a UTF encoded format. In you look at you INF file structure you will recognize some of the properties:

    &Speed=20&
    &Width=468&
    &Height=60&
Each line in the INF hold a variable and its value, for example "Speed". "Speed=20" means that the current "Speed" value is 20 and the scrolling motion speed is set to "20". Notice that each line start and end with the "&" symbol.This is very important for FNS to read all the data from the file. Variables are case sensitive. If the variable "Speed" is changed to "speed" it will not be recognized. We are now going to learn information about all variables (properties) in the configuration file.

Speed - Sets the scrolling speed of the FNS scrolling contents. Possible values - 0 (zero) no scroll. Fastest scrolling speed - 1. Slowest scrolling speed - 200. Must be a numeric value.

Width - Specifies the width of the projector. Minimum is 50. Maximum is 600. Must have a numeric value.

Height - Specifies the height of the projector. Minimum is 50. Maximum is 800. Must have a numeric value.

ScrollPause - Property that controls pause time between messages in seconds. Minimum is 0 (no pause). No maximum for this variable. Must have a numeric value.

HorizontalScroll - A boolean type variable - 1 (true) or 0 (false). The default scrolling of FNS is vertical. If this property is set to 1 (true) - FNS turns to horizontal scroller. Must have a numeric boolean value only.

HSWidth - aka Horizontal Scroll Width.This variable is not needed if HorizontalScroll is set to 0 (false). Else you must set this value to a positive number between 1-600. This specifies the default width of all boxes when horizontal scroll is enabled.

VerticalAlign - Veridical align works only if HorizontalScroll is set to 1 (true) in which case the horizontal scrolling is enabled. Default value is 0 which means top alignment. For center alignment set the value to 1 and for bottom alignment set it to 2. Must have a numeric values only 0,1 or 2.

BorderColor- Specifies the border color of the projector. Must be set in RRGGBB Hex. For example its value for white is FFFFFF. Do not enter the "#" symbol in front of the hex value.

UseHandCursor - If you wish to see the hand cursor on mouse over set this to 1 (true), else set it to 0 (false). Must have a numeric boolean values only.

StopOnMouseOver - Stop the scrolling motion on mouse over. Can be set to 1 (true) or 0 (false). Does not work if ScrollPause is enabled (set above 0). Must have a boolean values only.

EnableSound - Enables sound on click. Can be set to 1 (true) or 0 (false). Must have a boolean values only.

SoundFile - Specifies a sound file which will be played on click. must be a string value. If your file is "mysound.mp3" enter &SoundFile=mysound.mp3&. Do not forget the mp3 extension. Work only if EnableSound is set to 1(true). Must have a string value.

BackgroundColor - Specifies the default background color for all messages. Must be set in RRGGBB Hex. Do not enter the "#" symbol in front of the hex value.

CustomBackgrounds - Enables use of custom backgrounds for each message box. Can be set to 1 (true) or 0 (false). Must have a boolean values only.

URLTarget - Specifies the target window after a link is activated. For example: &URLTarget=_blank&. Can be set to "_blank" for a new window or "_self" if you want the link to open in the same window. Must have a string value.

Line - Specifies width of the contour which surrounds the message box on mouse over for all messages. If set to "0" (zero) the line width will be set to "hairline". No maximum restriction. Must have a numeric values only.

LineColor - Specifies the color of the contour which surrounds the message box on mouse over for all messages. Must be set in RRGGBB Hex. Do not enter the "#" symbol in front of the hex value.

LineAlpha - Specifies the alpha channel of the colored contour which surrounds the message box on mouse over. If set to 0 the line will not be visible. Maximum value is 100. Must have a numeric values only.

Font - Holds the value of the default font and its style. Example formatting: &Font=arial, bold&. The first part of the value (before the comma mark) is the font face (arial, verdana, tahoma, times etc.). The second part of the value (after the comma mark) is the font style. Font style can be set to "plain" , "bold" or "italic". the Font variable must have a string value.

FontSize - Specifies the default font size. Must have a numeric values only.

FontColor - Specifies font color. Must be set in RRGGBB Hex. Do not enter the "#" symbol in front of the hex value.

Fill - Specifies the on mouse over fill color. Must be set in RRGGBB Hex. Do not enter the "#" symbol in front of the hex value.

FillAlpha - Specifies the alpha channel of the colored on mouse over fill. If set to 0 the fill will not be visible. Maximum value is 100. Must have a numeric values only.

Leading - Specifies the Leading of text or space between lines of text. Must have a numeric values only. Default value is 1.

TextAlign - Default text alignment. Can be set to "left", "right" or "center". Justified text alignment is not supported due to some restrictions in the program language in which FNS is written, respectively ActionScript2.0. This variable must have string values only.

D & L - do not edit or delete the values of the D & L variables set in these two lines.

MessageN - Contents of your messages. Here you can add all your (CSS formatted) text and images. For example: &Message1=<b>myHTMLtext</b>&. Its value must be a HTML code or plain text.

MessageBkgN - Specifies background color for each message. Must be set in RRGGBB Hex. Work only if CustomBackground is set to 1 (true). Do not enter the "#" symbol in front of the hex value.

LinkN - Specifies a link for each message on click. For example &Link1=http://www.yahoo.com&. Do not forget the " http:// ". Must be a string URL address.

These are all the properties in your INF file. Here are some Tips:

If you wish to enable the use of CSS you must delete the following 3 lines from your INF file to disable the default font:

    &Font=Arial, Plain&
    &FontSize=12&
    &FontColor=000000&

We are going to finish this learning with some quick questions and answers about editing your INF file:

Q: What will happen if I change or delete the value of the "D" or the "L" variable?
A: FNS will not load and will probably give you an error message.

Q: How to disable the on mouse over fill and outline?
A:
Simply set LineAlpha and FillAlpha to zero.

Q: I have created my CSS file. How to add my classes to the text?
A:
Add your styles using the <span> or the <p> tag. Here is an example:
&Message1=<p class='mystyle'>My Colored Text</p>&
Don't forget the "&" at the beginning and at the end of each line.

Q: I have messed around with my INF file and now FNS is not loading. What should I do?
A:
Use the Settings Editor (wizard) to generate you a new FNS. And then just copy your old Messages from the "not-working" INF file.

Q: How to randomize the content of FNS?
A:
Use your server side code to randomize the content of FNS.

Q: I'm a web master. Can I use FNS to dynamically load data from my website's SQL database.
A:
Yes you can. Here is an example that loads an image located in a custom database of images via PHP script only by it's ID:
&Message1=<img src='http://www.mydomain.com/mydatabase.php?imageID=23'>&
This line of code should load Image with ID 23 in FNS.

Do not hesitate to contact us you have any questions about Flash News Scroller.

Last Update: March 31, 2005

Flash and Action Script are trademarks of Macromedia Inc.