xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
height="400" width="600">
import mx.controls.ToolTip;
import mx.managers.ToolTipManager;
private var tip:ToolTip;
private var s:String;
private function showTipA(event:Object):void {
s="My Tip A";
tip = ToolTipManager.createToolTip(s,event.currentTarget.x + event.currentTarget.width + 10,event.currentTarget.y) as ToolTip;
}
private function showTipB(event:Object):void {
s="My Tip B";
var pt:Point = new Point(event.currentTarget.x,event.currentTarget.y);
/* Call this method to convert the object's
coordinates inside its container to the stage's
global coordinates. */
pt = event.currentTarget.contentToGlobal(pt);
tip = ToolTipManager.createToolTip(s,pt.x + event.currentTarget.width + 10, pt.y) as ToolTip;
}
private function destroyTip(event:Object):void {
ToolTipManager.destroyToolTip(tip);
}
focusIn="showTipA(event)" focusOut="destroyTip(event)" />
focusIn="showTipB(event)" focusOut="destroyTip(event)" />
focusIn="showTipA(event)" focusOut="destroyTip(event)" />