This content has been marked as final.
Show 4 replies
-
1. Re: *@#% CSS ...
Newsgroup_User Sep 10, 2008 5:39 AM (in response to pale_dane)Looks to me like you simply set the .text property of your field, when you
need to set the .htmlText property. If you have specific questions please
ask, but asking 'how come it doesn't work' isn't going to get you far.
--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
-
2. Re: *@#% CSS ...
pale_dane Sep 10, 2008 6:48 AM (in response to Newsgroup_User)Thanks for the reply Dave/DMennenoh
Well then, here's a specific question.
I cut this code directly from the Adobe sample file named formattedtext.fla
I have a naive expectation, that I could simply change the CSS file name and the TXT file name in this code (of course pointing at a new directory), and the it would just ... WORK! But so far, no succes, and it is ekstremely frustrating (CCS in GoLive is a dream!).
Question is: what needs to be renamed/altered in this code to get it playing right:
//load text
function loadMyText(evt) {
var loadit_lv:LoadVars = new LoadVars();
loadit_lv.load(" http://www.helpexamples.com/flash/text/sampletext.txt");
loadit_lv.onLoad = function(success:Boolean) {
if (success) {
my_txt.text = this.content;
} else {
trace("Could not load text file.");
}
};
}
loadMyText();
//apply stylesheet
var flash_css = new TextField.StyleSheet();
flash_css.load(" http://www.helpexamples.com/flash/text/styles.css");
flash_css.onLoad = function(success:Boolean) {
if (success) {
my_txt.styleSheet = flash_css;
} else {
trace("Could not load CSS file.");
}
}; -
3. Re: *@#% CSS ...
kglad Sep 10, 2008 7:34 AM (in response to pale_dane)your textffied needs to be html enabled, you need to assign its htmlText property and you need to assign the style tags to the parts of your text that need styling. -
4. Re: *@#% CSS ...
Newsgroup_User Sep 11, 2008 6:36 AM (in response to Newsgroup_User)Like I mentioned, and kglad said as well - you need to set the htmlText
property of the field. Not the text property. Have a look in the Help at the
text field htmlText property...
--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/