Hello all, 
I am creating my own tooltip and I am getting an error, this code comes from 
adobe examples.  Here is the code:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Script><![CDATA[
    import mx.managers.ToolTipManager;
    import mx.controls.ToolTip;

    public var myTip:ToolTip;

    private function createBigTip():void {
        var s:String = "These buttons let you save, exit, or continue with the 
current operation."
        myTip = ToolTipManager.createToolTip(s,10,10) as ToolTip;
        myTip.setStyle("backgroundColor",0xFFCC00);
        myTip.width = 150;
        myTip.height = 200;
    }

    private function destroyBigTip():void {
        ToolTipManager.destroyToolTip(myTip);
    }
    ]]></mx:Script>
    
    <mx:Style>
        Panel {
            paddingLeft: 5;
            paddingRight: 5;
            paddingTop: 5;
            paddingBottom: 5;
        }
    </mx:Style>

    <mx:Panel title="ToolTips" rollOver="createBigTip()" 
rollOut="destroyBigTip()">
        <mx:Button label="OK" toolTip="Save your changes and exit."/>
        <mx:Button label="Apply" toolTip="Apply changes and continue."/>
        <mx:Button label="Cancel" toolTip="Cancel and exit."/>
    </mx:Panel>
</mx:Application>

I get this error:
Implicit coercion of a value of type ToolTip to an unrelated type 
mx.core:IToolTip. 

At this piece of code:
ToolTipManager.destroyToolTip(myTip);

Can someone tell me what I am doing wrong?

Thank you,
Tim Gallagher

Reply via email to