||07-03-2012 03:09 AM
External CSS Styling Not Being Applied
I've a manually created text field, newsText_tf
, into which I am able to load text. The text file, "writeUp1.txt"
, is definitely getting loaded, but the CSS styling found in "newsStyle.css" in not
getting applied, or loaded at all.:mad:
I slipped in a few trace commands and supposed the CSS is getting loaded, or at least the function in which the trace code is found is getting read.:p
Anyway, here's the code:
var navBanNews:URLRequest = new URLRequest("content_news/writeUp1.txt");
var newsLoader:URLLoader = new URLLoader(navBanNews);
var cssLoader:URLLoader = new URLLoader();
//Load the text file ("writeUp1.txt")
var newsLoaded:URLLoader = URLLoader(event.target);
newsBox_mc.newsText_tf.htmlText = newsLoaded.data;
//Load the CSS file ("newsStyle.css")
var newsStyleRequest:URLRequest = new URLRequest("content_news/newsStyle.css");
var newsStyle:StyleSheet = new StyleSheet();
newsBox_mc.newsText_tf.styleSheet = newsStyle;
newsBox_mc.newsText_tf.wordWrap = true;
trace("CSS load complete!");
I don't know if it means anything, but when I Test
the movie, the "CSS loaded" trace is displayed first in the Output panel.
||07-04-2012 02:50 AM
Select TLF Text in the Properties panel, when you have your text field selected!!
|All times are GMT +1. The time now is 02:37 AM.
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.