Flash xml + textArea component + CSS
Code:
Stage. scaleMode = "noscale"; // system. useCodepage = "true"; // set the format of the component mytext.html = true; myText. wordWrap = true; myText. multiline = true; myText. label. condenseWhite = true; trace (myText. label); // create a style sheet object var myCss = new TextField. styleSheet (); // load cssmyCss. load ("content.css"); myText. styleSheet = myCss; // load XML to the text component var myXML = new XML (); myXML. onLoad = function (success) {if (success) {myText. text = myXML;} else {myText. text = "content cannot be loaded. xml ";}}; myXML. load ("content. xml ");
You may have seen the key points here. I found some problems during the production process. I wonder if it is a TEXTFIELD BUG. if you set the font width in the CSS style sheet, you must set all the content to bold or normal. If the content is thick or fine, in the text, an error is displayed. if you have solved the problem, leave a message.
Uploaded attachment
|
Xmlcss.zip (147.4 KB, 505 views) |