flash xml+textArea组件+CSSflash xml+textArea组件+CSS



代码:
Stage.scaleMode = "noscale"; //system.useCodepage="true"; //设置组件的格式 myText.html = true; myText.wordWrap = true; myText.multiline = true; myText.label.condenseWhite = true; trace(myText.label); //创建样式表对象 var myCss = new TextField.StyleSheet(); //载入css myCss.load("content.css"); myText.styleSheet = myCss; //载入XML至文本哉组件 var myXML = new XML(); myXML.onLoad = function(success) { if (success) { myText.text = myXML; } else { myText.text = "不能载入content.xml"; } }; myXML.load("content.xml");


或许你已经看出这里的关键所在了.在制作过程中发现一些问题不知是不是TEXTFIELD的BUG.如果你在CSS样式表中设置的字体的粗细,必须将所有的内容都设为粗体或都为正常,如果设置的内容有粗有细,在文本中就会呈现有不正常显示的问题.如果你解决了,请留言.
上传的附件
flash xml+textArea组件+CSS xmlcss.zip (147.4 KB, 505次查看)

相关文章:

  • 2022-01-10
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2021-12-03
  • 2021-06-07
猜你喜欢
  • 2022-01-05
  • 2021-10-27
  • 2022-12-23
  • 2021-09-03
  • 2021-09-06
  • 2022-12-23
  • 2021-11-13
相关资源
相似解决方案