# \[AS2\]\[CS4\] Scrolling masked movieclip issue

**URL:** https://forum.kirupa.com/t/as2-cs4-scrolling-masked-movieclip-issue/282722
**Category:** flash
**Created:** [February 25, 2009, 5:51pm UTC](https://forum.kirupa.com/t/as2-cs4-scrolling-masked-movieclip-issue/282722 "2009-02-25T17:51:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![CYB34](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@CYB34](https://forum.kirupa.com/u/CYB34)
#### Post date: [February 25, 2009, 5:51pm UTC](https://forum.kirupa.com/t/as2-cs4-scrolling-masked-movieclip-issue/282722/1 "2009-02-25T17:51:23Z")

</div>

Hello,

I’m trying to make a movieclip (contentMain) scroll on the y-axis (using mouse wheel, not pan) with the following code:

mouseListener = new Object();  
mouseListener.onMouseWheel = function (delta) {  
contentMain.\_y += (delta\*4);  
}  
Mouse.addListener(mouseListener);

The problem is this simple code makes a movieclip scroll vertically but out of the masked area.  
I don’t know how to give the movieclip an upper/lower scroll limit.  
Could anyone give me hand?  
(the attached file is saved for CS3)
