簡體   English   中英

Flex文本鼠標懸停功能

[英]Flex text mouse over functionality

我需要在文本字段中開發一些鼠標懸停功能。

我可以通過具有htmlText和TextEvent來獲得單擊功能上的文本。

同樣,我可以在文本字段中獲得鼠標懸停功能嗎?

為什么將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來完成的,如果您正在使用TextField(我使用過flex3)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM