mc`_x & _y
2 отговора
77 прегледа
mc`_x & _y
na4i moje li mi kaete kod koito da checkva za opredeleni granici v koito da moje da se mesti edno mc ...
primerno _x <40 && _x>500 mersi wi :) i neiskam sum mnoo nahalen ama pls po skoro pi6ete ;]]]]
Re: mc`_x & _y
onClipEvent (enterFrame) {
xmin = 50;
xmax = 450;
if (this._x>=xmin && this._x<=xmax) {
if (key.isDown(key.RIGHT)) {
this._x += 10;
} else if (key.isDown(key.LEFT)) {
this._x -= 10;
}
}
if (this._x<xmin) {
this._x = xmin;
} else if (this._x>xmax) {
this._x = xmax;
}
}
za _y ;] si donapi6i koda
xmin = 50;
xmax = 450;
if (this._x>=xmin && this._x<=xmax) {
if (key.isDown(key.RIGHT)) {
this._x += 10;
} else if (key.isDown(key.LEFT)) {
this._x -= 10;
}
}
if (this._x<xmin) {
this._x = xmin;
} else if (this._x>xmax) {
this._x = xmax;
}
}
Re: mc`_x & _y
a kak 6e stane za mc koeto da se dviji samo na gore na dolu v nekvi granici..... ne6to ot toia tip primerno
onClipEvent (enterFrame) {
minpos=20
maxpos=300
this._y+=10
if (this._y>=maxpos) {
this._y -= 10;
} else if (this._y<=minpos) {
this._y += 15;
}
}
ama tuka tva ne6o ne ba4ka ? kak tria stane ?
onClipEvent (enterFrame) {
minpos=20
maxpos=300
this._y+=10
if (this._y>=maxpos) {
this._y -= 10;
} else if (this._y<=minpos) {
this._y += 15;
}
}
ama tuka tva ne6o ne ba4ka ? kak tria stane ?