![]() |
FLASH
NEWS SCROLLER |
|
Chapter 2: Adding rich content in FNS. Flash News Scroller has many features like adding custom background to each message, loading "Cascading Style Sheets" (CSS), embedding external flash animations and many more. FNS reads HTML formatted text and images from its configuration file (INF). In these examples we are going to learn how to add rich content in FNS with HTML tags. For more information on each HTML tag visit Macromedia Live Docs HERE. Part1: Adding images and flash animations using the <img> tag. You can embed images and flash animations in FNS using the <img> HTML tag. The engines supports non-progressive JPGs and SWF animations. For example, you want to load an image "image1.jpg" located in http://www.mydomain.com. Image size is 100px width and 50px height. To embed this image into FNS type in the Message1 box: <img src='http://www.mydomain.com/image1.jpg' width='100' height='50' vspace='0' hspace='0'> To explain how the <img> tags works lets look at each of its properties. "src" means image source, a link to the image. "width" & "height" are numbers representing the scale of the image. "vspace" & "hspace" are numbers representing the vertical and horizontal space surrounding the image default values are "8". Part 2: Using "Cascading Style Sheets" (CSS). FNS has 100% customizable text properties. Now we are going to explain how FNS is loading external CSS files which holds your text styles. Before we begin make sure that you disable the default font. Default font overwrites all your CSS classes. Here are the steps to disable it. Click the "Font properties" tab:
Now lets take a look at a simple CSS file and understand how to use the styles. Here are a sample CSS file contents:
font-family: Arial,Helvetica,sans-serif; font-size: 12px; color:#FF6600; }
There is an alternative way to use custom(colored & formatted) text in your messages using the <font> tag for more information read the supported html tags information in the link above. For more information about CSS. Click HERE visit this official site of CSS at "w3.org" and HERE for Macromedia's "Using style classes" support page for Flash. FNS supports embedding of MP3 encoded sounds. These sounds are played when the user clicks on a message and the link is activated. To design your own sounds you will need sound editing software which converts your WAV files to MP3. Stereo and Mono MP3 sounds are supported and a wide range of bitrates. We recommend that you use a Fraunhofer IIS based encoding. Just replace the filename attached with FNS for example: "Sound1.mp3" and you will have your sound playing on every click. That's all about this example. Click HERE to a look at Chapter 3 if you wish to know more about how to edit your INF (FNS settings file). Last Update: March 31, 2005 Flash and Action Script are trademarks of Macromedia Inc. | |