Urgent issue - to stop a mc..?

Would very much appreciate some noob help here. I’ve got the below piece of code, which scrolls a couple of mcs left and right within boundaries… however, within that mc are some buttons that cause popups to appear (and a button on those to make them disappear). What would I need to add to this code (I’m assuming I’ll need to add it here rather than on the popup code?) to make it so that, when a popup appears, the background layer mcs stop scrolling until the popup is closed? At the moment, the pop ups are harder to navigate around as they move left and right too, being on the mc I want to make stop…

Any help, urgently, would be much appreciated!!

Street.onRollOver = StreetOver;

function StreetOver() {
this.onEnterFrame = scrollStreet;
delete this.onRollOver;
}

var b = stroke.getBounds(_root);

function scrollStreet() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = StreetOver;
delete this.onEnterFrame;
}

if(Street._x &gt;= -50) {
    Street._x = -50;
}

if(Street._x &lt;= -660) {
    Street._x = -660;
}

var xdist = _xmouse - 340;

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

}

//Scroll Skyline

Skyline.onRollOver = SkylineOver;

function SkylineOver() {
this.onEnterFrame = scrollSkyline;
delete this.onRollOver;
}

var b = stroke.getBounds(_root);

function scrollSkyline() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = SkylineOver;
delete this.onEnterFrame;
}

if(Skyline._x &gt;= 0) {
    Skyline._x = 0;
}

if(Skyline._x &lt;= -100) {
    Skyline._x = -200;
}

var xdist = _xmouse - 340;

Skyline._x += Math.round(-xdist / 12);

}