# Scrolling a movie on rollover

**URL:** <https://forum.kirupa.com/t/scrolling-a-movie-on-rollover/231437>\
**Category:** flash\
**Created:** [July 4, 2007, 8:27pm UTC](https://forum.kirupa.com/t/scrolling-a-movie-on-rollover/231437 "2007-07-04T20:27:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mootv](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Mootv](https://forum.kirupa.com/u/Mootv)\
**Post date:** [July 4, 2007, 8:27pm UTC](https://forum.kirupa.com/t/scrolling-a-movie-on-rollover/231437/1 "2007-07-04T20:27:41Z")

</div>

Hi!

I’ve been asking on several forums for a solution to this very basic problem but without a solution:

I’m working inside a movie clip. On one layer I have a movie clip (a block of text and some images known by the instance name “faq\_1”) and on another I have two buttons in the form of arrows that have the instance names “up\_1” and “down\_1”…perhaps you see where I’m going here…

Anyway, what I wish to achieve is that when the user rolls over either button, “faq\_1” will smoothly scroll (with physics) up or down. I do not wish “faq\_1” to roll to a specific position, rather it ought be commensurate with the amount of time the cursor is held over the button.

So far I have been pointed in this direction:

```php

Up_1.addEventListener(MouseEvent.MOUSE_OVER, goUp);
function goUp(e:Event)
{
Faq_1.y -=10;
Down_1.removeEventListener("enterFrame",goDown);
}
Down_1.addEventListener(MouseEvent.MOUSE_OVER, goDown);
function goDown(e:Event)
{
Faq_1.y +=10;
Up_1.removeEventListener("enterFrame",goUp);
} 

```

However on mouse over it moves just the ten px and stops. I have to move out then over again.

Also, it would be useful to know how I get it to limit movement within an area - so that it stops once y=-200 or something…!

Thanks!
