# As 3.0 scrolling panel

**URL:** https://forum.kirupa.com/t/as-3-0-scrolling-panel/283873
**Category:** flash
**Created:** [March 12, 2009, 12:34am UTC](https://forum.kirupa.com/t/as-3-0-scrolling-panel/283873 "2009-03-12T00:34:06Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xPINKMERCEDESx](https://avatars.discourse-cdn.com/v4/letter/x/73ab20/32.png) [@xPINKMERCEDESx](https://forum.kirupa.com/u/xPINKMERCEDESx)
#### Post date: [March 12, 2009, 12:34am UTC](https://forum.kirupa.com/t/as-3-0-scrolling-panel/283873/1 "2009-03-12T00:34:06Z")

</div>

Hello guys. I’m trying to convert an actionscript 2.0 scrolling panel to actionscript 3.0. I’ve been trying to convert this for a whopping month now guys, really…and no one is helping me. It’s the scrolling panel from lee brimelow:

[http://www.gotoandlearn.com/play?id=25](http://www.gotoandlearn.com/play?id=25)

Here’s the code:

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._x &gt;= 89) {
    panel._x = 89;
}

if(panel._x &lt;= -751) {
    panel._x = -751;
}

var xdist = _xmouse - 250;

panel._x += Math.round(-xdist / 7);

```

}

Here’s a link to the source .fla:

[http://gotoandlearn.com/files/scrolling\_panel.zip](http://gotoandlearn.com/files/scrolling_panel.zip)

Thanks so much for any help.

x lisa x
