作者HelloJimmy (揪~~竟,能不能考上?)
看板Flash
标题[问题] 使用SkinClass後无法输入中文
时间Fri May 17 01:54:32 2013
大家好,
我的TextArea物件在使用SkinClass做美化後,
无法输入中文.
以下是程式码:
<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin
xmlns:fx="
http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark>
<fx:Metadata>
[HostComponent("views.punchView")]
</fx:Metadata>
<fx:Declarations>
<!--设定提示文字开关-->
<fx:Boolean id="focused">false</fx:Boolean>
</fx:Declarations>
<fx:Script>
<![CDATA[
static private const exclusions:Array = ["labelElement"];
//覆写SparkSkin内colorizeExclusions()
override public function get colorizeExclusions():Array
{
return exclusions;
}
]]>
</fx:Script>
<!--按键状态-->
<s:states>
<!--一般-->
<s:State name="normal" />
<!--不可点-->
<s:State name="disabled" />
</s:states>
<s:Scroller
id="scroller"
left="0"
top="0"
right="0"
bottom="0"
minViewportInset="1"
measuredSizeIncludesScrollBars="false"
hasFocusableChildren="false">
<!--正常文字-->
<s:RichEditableText
id="textDisplay"
backgroundColor="#FFFFFF"
backgroundAlpha="0"
paddingLeft="15"
color="#FFFFFF"
focusIn="focused = true;"
focusOut="focused = false;"
/>
</s:Scroller>
<!--提示文字-->
<s:RichText
id="hintTxt"
mouseEnabled="false"
mouseChildren="false"
paddingLeft="15"
visible="{!(textDisplay.text != '' || focused)}"
text="{getStyle('hint')}"
color="#FFFFFF"
backgroundColor="#FFFFFF"
backgroundAlpha="0"/>
</s:SparkSkin>
请高手解惑,
谢谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.166.211.12
1F:→ bera:[HostComponent("views.punchView")] 不用是TextArea吗 05/20 16:48
2F:→ bera:你要不要顺便贴你元件的程式码, 这个Skin TextArea无法套用啊 05/20 16:50
3F:→ HelloJimmy:punchView就是使用skinclass的view元件,里头有个 05/22 00:41
4F:→ HelloJimmy:TextArea套用了这个skinclass.punchview有点肥... 05/22 00:42