小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

给tool tips加上运动效果

示例:


代码:
<?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 fox" />

</mx:Application>

posted on 2008-04-26 20:50  『小小菜鸟』  阅读(271)  评论(0编辑  收藏  举报