The following example shows how you can add custom animation and effects when displaying a tool tip in Flex
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/09/04/adding-animations-and-effects-to-flex-tool-tips/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white"
        creationComplete
="init()">

    
<mx:Script>
        
<![CDATA[
            import mx.managers.ToolTipManager;

            private function init():void {
                ToolTipManager.hideDelay = 2000;
                ToolTipManager.showEffect = rotate;
                ToolTipManager.hideEffect = zoom;
            }
        
]]>
    
</mx:Script>

    
<mx:Style>
        @font-face {
            src: url("./fonts/arial.ttf");
            fontFamily: "ArialEmbedded";
        }

        ToolTip {
            fontFamily: ArialEmbedded;
        }
    
</mx:Style>

    
<mx:Rotate id="rotate" />
    
<mx:Zoom id="zoom" />

    
<mx:Button label="Roll over me to see tool tip"
            toolTip
="The quick brown foxAdding animations and effects to Flex tool tips (转载)" />

</mx:Application>

 

相关文章:

  • 2022-01-27
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-13
  • 2021-05-28
  • 2021-05-17
  • 2022-12-23
猜你喜欢
  • 2021-07-16
  • 2021-08-27
  • 2022-12-23
  • 2022-01-06
  • 2021-07-27
  • 2021-07-27
  • 2022-03-04
相关资源
相似解决方案