# ToolTip Class Help

**URL:** <https://forum.kirupa.com/t/tooltip-class-help/179366>\
**Category:** flash\
**Created:** [February 19, 2006, 12:12pm UTC](https://forum.kirupa.com/t/tooltip-class-help/179366 "2006-02-19T12:12:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reyco1\_com](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/reyco1_com/32/2169_2.png) [@reyco1\_com](https://forum.kirupa.com/u/reyco1_com)\
**Post date:** [February 19, 2006, 12:12pm UTC](https://forum.kirupa.com/t/tooltip-class-help/179366/1 "2006-02-19T12:12:32Z")

</div>

I would really appretate some help. I am very new to creating my own classes and have hit a bump in the road here. I made a tooltip class but it dont work ???

Can someone tell me what Im doing wrong?

this is the class:

```auto

import flash.filters.DropShadowFilter;
class ToolTip extends MovieClip {
    //-< declare variables >-\\
    var ds:DropShadowFilter;
    var theTip:TextField;
    var myformat:TextFormat;
    var msg:String;
    var timer:Number;
    var myMC:MovieClip;
    //-< declare functions >-\\
    public function ToolTip(myMC, msg) {
        myMC.onRollOver = function() {
            timer = setInterval(showTip, 350);
        };
        myMC.onRollOut = function() {
            clearTip();
        };
    }
    private function clearTip() {
        clearInterval(timer);
        theTip.removeTextField();
    }
    private function showTip() {
        clearInterval(timer);
        var ds:DropShadowFilter = new DropShadowFilter(2, 45, 0x000000, .50, 4, 4, 1, 1.5, false, false, false);
        _root.createTextField("theTip", 500, _xmouse+10, _ymouse-30, 10, 10);
        myformat.font = "Arial";
        myformat.bold = true;
        myformat.size = 10;
        _root.theTip.autoSize = true;
        _root.theTip.border = true;
        _root.theTip.background = true;
        _root.theTip.backgroundColor = 0xFFFFC9;
        _root.theTip.text = msg;
        _root.theTip.setTextFormat(myformat);
        _root.theTip.filters = [ds];
        positionTip();
    }
    private function positionTip() {
        _root.onEnterFrame = function() {
            _root.theTip._x = _xmouse+10;
            _root.theTip._y = _ymouse-30;
        };
    }
}

```

this is how I’m trying to use it:

```auto

import ToolTip;
myClip.Tip = new ToolTip(myClip, "Please Help!");

```
