将文本区域与xml文件对齐

时间:2013-04-12 09:04:34

标签: xml flash actionscript-2

我正在尝试将我的文本区域与我的.swf flash对齐。直接来自xml 我提到我有动作脚本2.0

我的代码是这样的:

<?xml version="1.0" encoding="iso-8859-1"?><content>
<!-- general vars -->
<section name="settings">
    <item name="textSelectable">true</item>
    <item name="copyright"><![CDATA[SICURO © 2013 | <font color="#ffffff"><a href="asfunction:_root.more_click_func, privacyPolicy"> PRIVACY POLICY</a></font> 
    ]]></item>
    <item name="companyName"><![CDATA[SICURO<font color="#ff0000">INVEST</font>
    ]]></item>
    <item name="slogan"><![CDATA[Youre SECURITY]]></item>
    <image imageUrl="_logo.png"/>
</section></content>

如何编辑companyName以直接从xml文件对齐中心?

任何想法我怎么编辑这个?在我的flash文档中看起来真的很难看。 我在Flash CS5中看到过。

function getCompanyName(textObj){
textObj.htmlText = getSettingsValue(mainObj, "companyName", "item");
textSelectable(textObj);} // End of the functionfunction getSlogan(textObj){
textObj.htmlText = getSettingsValue(mainObj, "slogan", "item");
textSelectable(textObj);} // End of the function

这是我应该编辑的内容?

1 个答案:

答案 0 :(得分:0)

像某人说的那样,在动作脚本中设置TextField中的alignemnt而不是在xml中编辑html。你会使用textObj.autoSize = "center";

如果您真的必须在xml中执行此操作,则可以在文本周围使用<center>标记

相关问题