【问题标题】:Flex text mouse over functionalityFlex 文本鼠标悬停功能
【发布时间】:2010-11-22 06:30:56
【问题描述】:

我需要在文本字段中开发一些鼠标悬停功能。

我可以通过 htmlText 和 TextEvent 获得点击功能上的文本。

同样,我可以在文本字段中获得鼠标悬停功能吗?

【问题讨论】:

    标签: apache-flex mouseover


    【解决方案1】:

    为什么要使用 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)"/>
    

    【讨论】:

    • 对不起,我认为问题应该如下。我想要文本字段中多个文本字符串的鼠标悬停功能。在 htmlText 中,我将拥有 3 个 herf 标签,因此在将鼠标悬停在 htmlText 中的每个超链接上时,我需要显示不同的数据。请帮忙。
    【解决方案2】:

            private function onMouseOver(event:MouseEvent):void
            {
                Alert.show('Hello Ankur Sharma');
            }
        ]]>
    </mx:Script>    
    

    嘿,这是使用 TextField 完成的,如果你在谈论 abt TextField(我使用 flex3)

    【讨论】:

    • 对不起,我认为问题应该如下。我想要文本字段中多个文本字符串的鼠标悬停功能。在 htmlText 中,我将拥有 3 个 herf 标签,因此在将鼠标悬停在 htmlText 中的每个超链接上时,我需要显示不同的数据。请帮忙。
    猜你喜欢
    • 2011-07-07
    • 1970-01-01
    • 2019-02-16
    • 1970-01-01
    • 1970-01-01
    • 2011-10-24
    • 2011-07-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多