Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | JavaScript | How to create a Scrolling Ticker SEARCH    

MioFactory

  TechNotes
Adding a Login feature
Get the real size of a web page
How to create a Business Card
How to create a Desktop Alert
How to create a Desktop Ticker
How to create a Scrolling Alert Software
How to create a Scrolling Ticker
How to create a simple RSS Reader
How to debug
LCD Monitor Chart: Screen Resolution, Size, Pitch, Display Area
Managing read marks
Measuring Elements in JavaScript
Media center remote control
Statistics: How to track users and actions
XML Configuration File Format

  Help
01. Introduction
02. Creating an application
03. Application Settings
04. Manipulating Files
05. Editing Code
06. MioFactory Installer
07. Publishing Applications

  JavaScriptLibraries
alertEngineEx.js
channels.js
gui.k
mioEngine.js
optionsMenu.js
popupAlert.kLIB
popupAlertEx.js
scrollingTicker.js
stats.js
window_resizable.k
xmlFeed.js
xmlSettings.js

  Products
All Products
MioDB
MioFactory
Mioplanet Admin Panel

TechNote
How to create a Scrolling Ticker

Language: JavaScript
Product: MioFactory


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.





Library AdminPanel

Variables

alerts_bag[][]  |  channels_bag[][]  |  channel_id[]  |  current_alert  |  current_alert_id  |  current_channel  |  current_channel_id  |  current_software  |  current_software_id  |  server_http_root[]  |  server_stats_root[]  |  software_bag[][]  |  software_id[]  |  tab_accounts  |  username  |  xdata_alertsActive[]  |  xdata_alertsHistory[]  |  xdata_alerts[]  |  xdata_channels[]  |  xdata_software[]


Library alertEngineEx.js

Functions

alertEngine_init  |  alertEngine_popup_hide  |  alertEngine_processed

Variables

alertEngine_default_textColor  |  alert_history_max  |  alert_toPopup_max


Library channels.js

Functions

channels_feeds_get  |  channels_feeds_getByCategory  |  channels_feeds_getIndex  |  channels_get_allCategories  |  channels_get_categories  |  channels_get_value  |  channels_init  |  channels_latestNews_clear  |  channels_latestNews_countUnread  |  channels_latestNews_getNextUnread  |  channels_latestNews_getReadMark  |  channels_latestNews_hasUnread  |  channels_latestNews_setAllReadMarks  |  channels_latestNews_setReadMark  |  channels_loadFromMemory  |  channels_readMarks_countUnread  |  channels_readMarks_nextUnread  |  channels_readMarks_setAllAsRead  |  channels_set_value  |  start_download_channels

Events

all_channels_refreshed  |  latest_news_onchange

Variables

default_channels[]  |  default_channels_count  |  enabled_channels[]  |  enabled_channels_count  |  feeds_data[][]  |  latest_news[]  |  latest_news_count  |  MAX_HISTORY_ITEMS  |  MAX_HISTORY_LENGTH  |  MAX_LATEST_NEWS_ITEMS  |  MAX_LATEST_NEWS_LENGTH  |  MAX_LATEST_NEWS_PER_CHANNEL


Library mioEngine.js

Functions

error  |  log  |  logIsEnabled  |  mioxml_createObject  |  mioxml_download  |  mioxml_extract  |  mioxml_getElement  |  mioxml_getElementArray  |  mio_alert  |  mio_autoRestart  |  mio_autoShape_apply  |  mio_autoShape_end  |  mio_autoShape_start  |  mio_close  |  mio_createDownloadID  |  mio_data_get  |  mio_data_getBool  |  mio_data_load  |  mio_data_save  |  mio_data_set  |  mio_dialog  |  mio_dialog_close  |  mio_dialog_html  |  mio_execScript  |  mio_fadeIn  |  mio_fadeOut  |  mio_file_get  |  mio_file_load  |  mio_file_save  |  mio_maintenance  |  mio_menu  |  mio_openAtStartup  |  mio_openURL  |  mio_restart  |  mio_run  |  sendToMio

Variables

isDownloading  |  mioData


Library miolib.js

Functions

array_addIfNotExists  |  array_indexOf  |  array_insertItem  |  array_removeItem  |  blink_set  |  call_callback  |  comma  |  disableOnSelectStart  |  echo  |  isNumber  |  mailTo  |  replace  |  str_decrypt  |  str_encrypt  |  str_posEx  |  text_ellipsis  |  trim

Variables

MIO_XML


Library optionsMenu.js

Functions

linksMenu_show  |  optionsMenu_show


Library scrollingticker.js

Functions

ticker_add  |  ticker_get_scrolling_text  |  ticker_scroll_restart  |  ticker_set_callback  |  ticker_set_text  |  ticker_start  |  ticker_staticMessage

Variables

TICKER_PAUSED  |  TICKER_SCROLL_RATES  |  TICKER_SCROLL_STEPS


Library stats.js

Functions

stats_software_send  |  stats_trackingID_send


Library xmlFeed.js

Functions

xmlfeed_load  |  xmlfeed_readMarks_clear  |  xmlfeed_readMarks_isRead  |  xmlfeed_readMarks_isUnread  |  xmlfeed_readMarks_load  |  xmlfeed_readMarks_save  |  xmlfeed_readMarks_setAsRead  |  xmlfeed_readMarks_setAsUnread

Variables

MAX_NEWS_PER_FEED  |  MAX_READMARKS


Library xmlsettings.js

Functions

xml_settings_ads_get  |  xml_settings_appUpdate  |  xml_settings_download  |  xml_settings_getLocalVersion  |  xml_settings_menu_get

Variables

XML Alerts Feeds  |  xml_settings_obj  |  xml_settings_xml