PDA

View Full Version : .css with dyn. text box in flash??


natronp
07-14-2004, 12:38 PM
okay, i stumbled apon this code somewhere.... (the .css part) and am trying to apply it to text i'm loading from an .asp page.

anyone have experience with .css and flash? I want to either take the line breaks out and make them "soft-returns" (i don't know the real term) so I don't have a huge ammount of space between lines of type in flash....

here's the code i'm trying to use.... maybe it's AS 2.0 and I can't use it with Mx (what I have) anyhow, any feedback help is greatly appreciated...

if (myData.status == "good") {
day_txt.Text = myData.day;
specials_txt.Text = myData.specials;
} else {
specials_txt.Text = myData.errorMsg;
}
var format = new TextField.StyleSheet();
var path = "thestackflash.css";
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
specials_txt.styleSheet = format;
} else {
specials_txt.text = "Error loading CSS file!";
}
};
stop();

CyanBlue
07-14-2004, 01:09 PM
Howdy...

I do not understand what you are trying to do...

You cannot get any help on CSS if you use FMX, period... FMX does not understand what the CSS is...

natronp
07-14-2004, 01:14 PM
Snap! I thought that was maybe the problem... only in mx2004 huh?
thanks for the reply Cyan!