【发布时间】:2010-11-22 06:30:56
【问题描述】:
我需要在文本字段中开发一些鼠标悬停功能。
我可以通过 htmlText 和 TextEvent 获得点击功能上的文本。
同样,我可以在文本字段中获得鼠标悬停功能吗?
【问题讨论】:
标签: apache-flex mouseover
我需要在文本字段中开发一些鼠标悬停功能。
我可以通过 htmlText 和 TextEvent 获得点击功能上的文本。
同样,我可以在文本字段中获得鼠标悬停功能吗?
【问题讨论】:
标签: apache-flex mouseover
为什么要使用 htmlText 和 TextEvent 来实现点击功能? flex中存在点击功能。鼠标悬停也是如此..
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ public function clickHandler(event:MouseEvent):void{ //handle click here.. } public function mouseOverHandler(event:MouseEvent):void{ //handle mouse over event here.. } ]]> </mx:Script> <mx:Text x="84" y="72" text="Text" width="212" height="43" click="clickHandler(event)" mouseOver="mouseOverHandler(event)"/>
【讨论】:
private function onMouseOver(event:MouseEvent):void
{
Alert.show('Hello Ankur Sharma');
}
]]>
</mx:Script>
嘿,这是使用 TextField 完成的,如果你在谈论 abt TextField(我使用 flex3)
【讨论】: