Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 22-01-2006, 07:51   #1 (permalink)
Neuer User
 
Registriert seit: Nov 2005
Beiträge: 17
bewegung

bitte um hilfe.
ich will das die figur am unteren rand eine begrenzung hat und nicht rausfällt...
was mache ich falsch?

onClipEvent (load) {
ymove = 0;
air = 0;
unterer_rand = 360;
rechter_rand = 384;
linker_rand = 100;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP) && air == 0) {

ymove = -15;
air = 1;

}
if (Key.isDown(Key.LEFT) && this._x > linker_rand) {
this._x -= 6;
}
if (Key.isDown(Key.RIGHT)&& this._x < rechter_rand) {
this._x += 6;
}
this._y += ymove;
if (this._y != (383) && air == 1) {
ymove++;
} else {
air = 0;
ymove = 0;
}
}

danke
maramsi ist offline   Mit Zitat antworten
Alt 22-01-2006, 11:32   #2 (permalink)
Techniker
 
Benutzerbild von hgseib
 
Registriert seit: Sep 2003
Ort: 64807
Beiträge: 16.321
a) wir sind keine hellseher. was macht den dein script? warum behandelst du this._y vollkommen anders als this._x? nicht, das wir das wirklich wissen wollen, aber:
unterer_rand = 360;
this._y != (383)

b) die figur wird ja auch eine höhe und breite haben.
__________________
die ultimative antwort auf alle programmierfragen: der debugger
mfg h.g.seib www.SeibsProgrammLaden.de
hgseib ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 20:04 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele