17-03-2005, 20:08
|
|
|
חבר מתאריך: 25.10.04
הודעות: 65
|
|
תודה אחי אבל לא השתמשתי בזה
מי שרוצה לדעת זה הקוד לבעיה:
קוד:
onClipEvent (load) {
j=false;
v=0;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) && !j) {
j=true;
v=20;
}
if (j) {
v-=1;
if (v<=-10) {
v=-10;
}
this._y-=v;
}
if (_root.ground.hitTest(this._x,this._y+15,true)) {
j=false;
v=0;
}
if (_root.ground.hitTest(this._x,this._y-15,true)) {
v=0;
}
if (Key.isDown(Key.RIGHT)) {
this._x+=5;
}
if (Key.isDown(Key.LEFT)) {
this._x-=5;
}
this._y+=5;
if (_root.ground.hitTest(this._x,this._y+15,true)) {
this._y-=5;
}
}
|