In this example you can see how we can use the effect with tooltip.
In this example you can see how we can use the effect with tooltip.In this example you can see how we can use the effect with tooltip. You can provide the effect to the tooltip by using ToolTIpManager. You set the Show and Hide property of the ToolTipManager.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="9955" minHeight="600" creationComplete="initApp();"> <fx:Style> @namespace s "library://ns.adobe.com/flex/spark"; @namespace mx "library://ns.adobe.com/flex/mx"; mx|ToolTip{ font-family:Verdana; font-weight:bold; color:#FFFFFF; background-color:red; text-align:center; corner-radius:10; } </fx:Style> <fx:Declarations> <mx:Sequence duration="500" id="tooltipEffect"> <mx:Blur id="imageBlurOn" blurXFrom="0.0" blurXTo="20.0" blurYFrom="0.0" blurYTo="20.0"/> <mx:Blur id="imageBlurOff" blurXFrom="20.0" blurXTo="0.0/font>&" blurYFrom="20.0" blurYTo="0.0"/> </mx:Sequence> </fx:Declarations> <fx:Script> <![CDATA[/p> import mx.managers.ToolTipManager; private function initApp():void { ToolTipManager.enabled = true; ToolTipManager.showEffect = tooltipEffect; } ]]> </fx:Script> <s:Panel id="pnl" title="Effect with ToolTip Example" width="237" height="162" chromeColor="#555555" color="#FFFFFF" backgroundColor="#000000"> <s:Button label="ToolTipEffect" toolTip="ToolTipEffect" x="19" y="17"/> </s:Panel> </s:Application> |
To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.