How can I add a RSS feed as a ticker source?

From AVObjects Knowledge Base
Jump to: navigation, search

It is really simple. All you need is pass the RSS xml URL as a ticker content using TickerAddContent method like this:

C# sample code:

//TiclerID
string myRssTickerId = "my-rss-ticker";
//Add new ticker
m_pMLCharGen.TickerAddNew("<cg-item><ticker type='ticker-horz'/><graphics color='ML(180)-White(180)'/><default-text bold=true size='20' style='uppercase'/></cg-item>", 0.05, 0.05, 0, 0, 1, 1, ref myRssTickerId);
//Add RSS as ticker content 
m_pMLCharGen.TickerAddContent(myRssTickerId, "http://newsrss.bbc.co.uk/rss/sportonline_world_edition/front_page/rss.xml", "remove-all");

You can test it on our Character Generator C# sample application. Here ia s sequence of actions:

  • Run Character Generator C# sample application.
  • Disable Demo mode if it is enabled.
  • Press "Show CG Config Panel" button to open the configuration panel.

CG rss1.jpg

  • Add new ticker by clicking the "Add Ticker" button. No need to add any content to the ticker, so press "Cancel" on the open file dialog.
  • Set your ticker to be displayed by doubleclicking on the "show" field of ticker.
  • Input your RSS feed URL to Ticker Content text box.
  • Press "Add Text" button to add URL as a source to the ticker.

CG rss2.jpg

  • Now your ticker is displaying content from RSS reed. You can close the configuration panel and enjoy.

CG rss3.jpg

Personal tools