DuRanG
03-18-2003, 04:07 PM
well ive got a very simple problem here. im doing a menu that slides a movielcip(called "menu") with movieclips inside(called "mc1", "mc2", et cetera). in order to make the movement looks infinite, the menu duplicates itself when necessary(calling the copies "menu1", "menu2", et cetera). i want the menu and all its copies to stop when the mouse goes over any mcx(mc1 to mc7), but its just not working, as you can see in the .fla.
I used, inside "menu":
a = 0;
onEnterFrame = function () {
if (_root.p1 != true) {
this._x = this._x-5;
this._y = 0;
if (this._x<=-this._height && a == 0) {
duplicateMovieClip(menu, "menu"+_root.n, _root.n);
_root["menu"+_root.n]._x = 660;
_root["menu"+_root.n]._y = 0;
_root.n = _root.n+1;
a = 1;
}
}
}
and inside "mc1":
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.p1 = true;
} else {
_root.p1 = false;
}
}
the .fla file (http://www.durang.kit.net/botao.fla)
I used, inside "menu":
a = 0;
onEnterFrame = function () {
if (_root.p1 != true) {
this._x = this._x-5;
this._y = 0;
if (this._x<=-this._height && a == 0) {
duplicateMovieClip(menu, "menu"+_root.n, _root.n);
_root["menu"+_root.n]._x = 660;
_root["menu"+_root.n]._y = 0;
_root.n = _root.n+1;
a = 1;
}
}
}
and inside "mc1":
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.p1 = true;
} else {
_root.p1 = false;
}
}
the .fla file (http://www.durang.kit.net/botao.fla)