Flex Tooltip Animation

by Deepak Dhakal 3. June 2009 06:56

So you want to show some animation to show tooltip when U hover over something ? Here is an example that shows a rotating tooltip

Change as you want ..

 

<?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 magic"
toolTip="Sorry No Magic..." />

</mx:Application>



Tags:

Flex

Powered by BlogEngine.NET 1.5.0.7 - Old School Theme by n3o Web Designers