The idea is to make a button that looks like an icon that shows a few lines of text near it whenever it is clicked. It is sort of like tooltip, but the text is more elaborate. Please say how it is done?.
Here are my attempts ... they were not successfull..
ActionScript Code:
<mx:Image x="134" y="184" source="file:///D|/Info.png" scaleContent="true" width="8" height="8"
click="clicked()"/>
<mx:Script>
<![CDATA[
private function clicked():void {
label = "clickedclickedclicked";
b2.toolTip = "toolTip toolTip kedclicked";
}
private function showtext(event:Event):void
{
label = "showtext";
}
private function handleImageClick(event:Event):void
{
//icony.label = "handleImageClickhandleImageClick";
icony.toolTip = "handleImageClickhandleImageClick";
}
[Bindable]
[Embed(source="Info.png")]
private var myIcon:Class;
]]>
</mx:Script>
<mx:Image source="{myIcon}" useHandCursor="true" buttonMode="true" click="handleImageClick(event)"
toolTip="A Red Button" id="icony"/>
<mx:Button label="" id="b2" toggle="true" x="82" y="82" scaleX=".5" scaleY=".5"
color="0xFFFFAA" textRollOverColor="0xAAAA55" textSelectedColor="0xFFFF00"
click="showtext(event)"/>
<mx:Style>
Button
{
upSkin: Embed("Info.png");
overSkin: Embed("Info.png");
downSkin: Embed("Info.png");
}
</mx:Style>
<mx:Button />