PDA

View Full Version : AS (2) and CSS - dynamic text field


SteveH
08-07-2008, 03:57 PM
Hello

I use the following Action Script to display a newsfeed on my MX 2004 site:

myFeed = new LoadVars();
myFeed.load("BBCfeed.asp");
myFeed.onLoad = mx.utils.Delegate.create(this, onFeedLoad)

bbcNews_txt.html = true;
bbcNews_txt.multiline = true;

function onFeedLoad(success)
{
if(success)
{
bbcNews_txt.htmlText = myFeed.html;
}
else
{
bbcNews_txt.htmlText = "Error!";
}
}

I was hoping to incorporate some kind of formatting using a CSS style sheet (I have posted a message on that board) so that I have a noticeable headline (perhaps a different colour and maybe in bold), followed by a brief description.

Bearing in mind the Action Script above, which Action Script would I use to show m feed as formatted by a file called, say, Test.CSS?

Many thanks.

Steve

gnomeontherun
08-09-2008, 11:13 PM
http://www.kirupa.com/developer/mx2004/css.htm

SteveH
08-12-2008, 09:40 AM
Many thanks for the link, Jeremy. I'll take a look at it.

Steve