# Start/Stop MC in a tooltip

**URL:** <https://forum.kirupa.com/t/start-stop-mc-in-a-tooltip/319991>\
**Category:** flash\
**Created:** [March 10, 2011, 4:28pm UTC](https://forum.kirupa.com/t/start-stop-mc-in-a-tooltip/319991 "2011-03-10T16:28:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeophex](https://avatars.discourse-cdn.com/v4/letter/x/c37758/32.png) [@Xeophex](https://forum.kirupa.com/u/Xeophex)\
**Post date:** [March 10, 2011, 4:28pm UTC](https://forum.kirupa.com/t/start-stop-mc-in-a-tooltip/319991/1 "2011-03-10T16:28:18Z")

</div>

Hello,

Attached is my .fla

Basically, I followed a tutorial  
[http://library.creativecow.net/articles/brimelow\_lee/tooltips/video-tutorial](http://library.creativecow.net/articles/brimelow_lee/tooltips/video-tutorial)  
and have a basic tooltip working (actions in layer1, frame1 of main  
timeline).

```auto
tooltip._visible = false;

var tipInt;

b1.onRollOver = function() {
    tipInt = setInterval(showTip,100);
}

b1.onRollOut = function() {
    hideTip();
}

b2.onRollOver = function() {
    tipInt = setInterval(showTip,100);
}

b2.onRollOut = function() {
    hideTip();
}

var count = 0;

function showTip() {
    if(count == 1) {
        clearInterval(tipInt);
        count = 0;
        tooltip._x = _root._xmouse;
        tooltip._y = _root._ymouse;
        tooltip._visible = true;
        _root.onMouseMove = function() {
            tooltip._x = _root._xmouse;
            tooltip._y = _root._ymouse;
            updateAfterEvent();
        }
    }
    
    else {
        count++;
    
    }
}

function hideTip() {
    clearInterval(tipInt);
    tooltip._visible = false;
    delete _root.onMouseMove;
}

```

However, I don’t know enough to work out how to START the tooltip MC  
playing when it’s visible and STOP it when hidden. Currently it’s as if it  
loops continuously in the background. I don’t wish to pause the MC when  
not visible, just restart it from beginning when the tooltip shows again.

Hope that makes sense.

Also, IDEALLY I’d like a quick fade-in and fade-out of the tooltip when  
it’s made visible or hidden. From 0% alpha to 100% over a second  
or so. So it fades in to visible onRollOver and fades to hidden onRollOut,  
rather than just appearing instantly.

If anyone could shed some light on this I’d be extremely grateful.

Regards,  
Ralph
