# Mask Tween over thumnail scroller

**URL:** <https://forum.kirupa.com/t/mask-tween-over-thumnail-scroller/265961>\
**Category:** flash\
**Created:** [July 15, 2008, 12:04am UTC](https://forum.kirupa.com/t/mask-tween-over-thumnail-scroller/265961 "2008-07-15T00:04:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![virtualgeorge](https://avatars.discourse-cdn.com/v4/letter/v/f0a364/32.png) [@virtualgeorge](https://forum.kirupa.com/u/virtualgeorge)\
**Post date:** [July 15, 2008, 12:04am UTC](https://forum.kirupa.com/t/mask-tween-over-thumnail-scroller/265961/1 "2008-07-15T00:04:38Z")

</div>

In flash 8 I created a thumnail scroller from a tutorial and have this in frame 1

```auto
panel.onRollOver = panelOver;

function panelOver() {
    this.onEnterFrame = scrollPanel;
    delete this.onRollOver;
}

var b = stroke.getBounds(_root); 

function scrollPanel () {
    if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.ymax) {
    this.onRollOver = panelOver;
    delete this.onEnterFrame;
}

    if (panel._y >= 4) {
        panel._y = 4;
      }
    if (panel._y <= -248) {
        panel._y = -248;
      }

    //set to half stage width
    var ydist = _ymouse - 140;
    
    //sets speed - lower = faster
    panel._y += -ydist / 7;
}    
        }

```

I have a mask so you see only 3 thumnails and scroll to see the rest. But I want to tween the mask so initially it is small and only shows 1 thumnail, then when moused over the mask expands to expose more thumnails so I added this to the above code named the mask ‘mask’:

```auto
    //mask tween    
    mask.onRollOver = function ()
        {
        mask.gotoAndPlay(2);
        }
    mask.onRollOut = function ()
        {
        mask.gotoAndPlay(11);

```

So now the mask does tween when rolled over & out but now my scroller that is under the mask doesn’t work.

Can someone please point me in the right direction so I can properly code the mask tween?  
thanks!
