Let's say I have one text area, and I want to show Weather in it, then have the weather vanish and an RSS feed show up instead. And I want it to loop between these two things. Right now I'm trying this code:
Code:
talklayer.Visible=true; //is the text area supposed to be visible?
function hideInfo() // hides both the weather info and RSS info layers
{
Weather_Info.Visible = false;
RSSText1.Visible = false;
}
function exchanger() // called at widget load
{
while (talklayer.Visible==true) //is the text area visible to the user
{
hideInfo(); // empty the text area
RSSText1.Visible = true; //show me the RSS feed text
sleep(1500); //leave it up for a while
hideInfo(); // hide all text
Weather_Info.Visible = true; //Show me the Weather text now
hideInfo(); //hide all the text
sleep(1500); //wait, repeat on loop
}
}
My problem is using this code both layers show up simultaneously and they won't turn off. Am I doing something wrong? Is there a better way to rotate between text layers?