Home Tutorial Flex Flex4 Components ToolTip Effect in Flex4

 
 

ToolTip Effect in Flex4
Posted on: August 30, 2010 at 12:00 AM
In this example you can see how we can use the effect with tooltip.

ToolTip Effect in Flex4:

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.

Example:

<?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>

Output:

Running Application:

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.

Download this code

Related Tags for ToolTip Effect in Flex4:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.