<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" viewSourceURL="srcview/index.html"> <mx:Script><![CDATA[ import mx.events.ToolTipEvent; private function createCustomTip(title:String, body:String, event:ToolTipEvent):void { var ptt:PanelToolTip = new PanelToolTip(); ptt.bodyText = body; ptt.title=title; event.toolTip = ptt; } private function positionTip(event:ToolTipEvent):void{ event.toolTip.x=event.currentTarget.x + event.currentTarget.width + 10; event.toolTip.y=event.currentTarget.y; } ]]></mx:Script> <mx:Style> PanelToolTip { borderSkin: ClassReference("MyPanelSkin"); } </mx:Style> <mx:Button id="b1" label="Delete" toolTip=" " toolTipCreate="createCustomTip('DELETE','Click this button to delete the report.', event)" toolTipShow="positionTip(event)" /> <mx:Button id="b2" label="Generate" toolTip=" " toolTipCreate="createCustomTip('GENERATE','Click this button to generate the report.', event)" toolTipShow="positionTip(event)" /> <mx:Button id="b3" label="Stop" toolTip="Click this button to stop the creation of the report. This button uses a standard ToolTip style." /> </mx:Application>