简体   繁体   中英

Flex text mouse over functionality

I need to develop some mouse over functionality in text field.

I could get the text on click functionality by having htmlText & TextEvent.

Similarly, can i get the mouseover functionality in text field ?

why use htmlText and TextEvent for on click functionality? click functionality is present in flex.So is mouse over..

  <?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>    

Hey this is done using TextField, if u were talkin abt TextField(i used flex3)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM