I have two RSS news feeds in my project. I want to manipulate them each a little differently. Here is an excerpt from my autorun.brs file:
Code: Select all
Sub UpdateRSSStrings(zone as Object, playlistItem as Object)
rssStringCount = zone.widget.GetStringCount()
zone.widget.PopStrings(rssStringCount)
article = playlistItem.rssParser.GetNextArticle()
while type(article) = "roRssArticle"
artdesc = ""
if article.GetDescription() = "***" then
zone.widget.SetBackgroundColor(&haaff0000)
endif
if article.GetDescription() <> "" then
artdesc = ": " + article.GetDescription() + "..."
endif
zone.widget.PushString(article.GetTitle() + artdesc)
article = playlistItem.rssParser.GetNextArticle()
endwhile
End Sub
My first "if" statement is successfully turning the background of the zone to red if the description of the news article equals "***" which is what I want. However, I don't know how to return the background color of the zone to its normal color if the next news article's description does not equal "***". I could simply use zone.widget.SetBackgroundColor to explicitly put it back to the non-urgent color, but since this function is called for both of my RSS ticker zones I would wind up changing the background color on both zones which I don't want to do. So what I'm looking for is either a command to set the background color back to "normal" for that zone or a way to identify which zone I'm working on at the moment.
Any help would be appreciated.
Michael Keen
Southern Vermont College