|
|
|
|
MioFactory TechNotes
Help
JavaScriptLibraries
Products
|
|
In most of the cases, a desktop scrolling ticker is an horizontal bar that can be docked up or down on the windows desktop.
You can also add a scrolling area in any other kind of MioEngine based application.
With the help of the libraries provided with MioFactory, you can add one or several scrolling texts areas in your application that displays continuous information downloaded from RSS feeds (channels).
Scrolling Ticker HTML code
First of all, you must define a DIV tag for all your scrolling text areas.
This DIV tag should be declared as follow:
<DIV| | id='TickerID'
valign='center'
style='margin-top:4px; overflow:hidden; width:100%; height:23px; cursor:default'
| >
</DIV>
Creating the content and starting the ticker
The content of the RSS feeds are retrieved with the help of channels.js.
1. Call the function ticker_add to create the scrolling ticker area. A text can be set while the application is loading the channels from the Internet.
2. Download the RSS feeds with start_download_channels.
3. When download is completed, build the HTML code with ticker_get_scrolling_text.
Updating the scrolling ticker
The library channels.js downloads the channels (RSS feeds) at an interval defined in the XML configuration file of the application.
When the scrolling is completed (for more info: {lib:TICKER_SET_CALLBACK}), you should refresh the HTML code with ticker_set_text and ticker_get_scrolling_text.
The function ticker_get_scrolling_text from scrollingTicker.js creates the HTML code for the scrolling ticker depending on the settings in the XML configuration file (XML Configuration File Format) and the content of the RSS feeds.
|
|
|