Código ActionScript :
stop();
import clasesss.ToolTip;
import flash.net.URLRequest;
var tooltip:ToolTip = ToolTip.getInstance();
addChild(tooltip);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
btn1.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
btn2.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
btn3.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
btn4.addEventListener(MouseEvent.MOUSE_OVER,onOver,false,0,true);
btn1.addEventListener(MouseEvent.MOUSE_OUT,onOut,false,0,true);
btn2.addEventListener(MouseEvent.MOUSE_OUT,onOut,false,0,true);
btn3.addEventListener(MouseEvent.MOUSE_OUT,onOut,false,0,true);
btn4.addEventListener(MouseEvent.MOUSE_OUT,onOut,false,0,true);
btn1.addEventListener(MouseEvent.CLICK, link1);
function onOver(e:MouseEvent):void
{
switch (e.target.name)
{
case "btn1" :
tooltip.followMouse = true;
tooltip.fixedWidth = 150;
tooltip.multiLine = true;
tooltip.show("Palabras");
break;
case "btn2" :
tooltip.followMouse = true;
tooltip.fixedWidth = 150;
tooltip.multiLine = true;
tooltip.show("Etapas");
break;
case "btn3" :
tooltip.followMouse = true;
tooltip.fixedWidth = 150;
tooltip.multiLine = true;
tooltip.show("Costos");
break;
case "btn4" :
tooltip.followMouse = true;
tooltip.fixedWidth = 150;
tooltip.multiLine = true;
tooltip.show("Documentos");
break;
}
}
function onOut(e:MouseEvent):void
{
tooltip.hide();
}
function link1 {
var url:String = "http://www.xyz.com";
var rege: URLRequest = new URLRequest(url);
try{
navigateToURL(rege, "_blank");
} catch (e:Error) {
trace("erorr de carga URL");
}
}
