So i'm trying to make a Scroll Panel, but somewhere i've run into a bit of a problem. The panel doesn't scroll when the mouse moves over it. I followed a video tutorial, BTW. Here's my actionscript.



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 >= 65.2) {
panel._x = 65.2
}
if (panel._x <= -187.8) {
panel._x = -187.8
}

var xdist = _xmouse - stage.width/2;

panel._x += -xdist / 7;