code:
onClipEvent (load) {
x = 0;
// you'll need to adjust both of these quantities.
minX = -400; // minimum value for this._x
maxX = 400; // maximum value for this._x
}
onClipEvent (enterFrame) {
if (x < 0)
{
if (this._x + x < minX) this._x = minX;
else this._x += x;
}
else if (x > 0)
{
if (this._x + x > maxX)this._x = maxX;
else this._x += x;
}
// simplified these...
if (_root._xmouse<50) {
if (x>-3) {
x -= 0.15;
}
}
if (_root._xmouse>715) {
if (x<3) {
x += 0.15;
}
}
}




Reply With Quote