Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 31-10-2006, 10:12   #1 (permalink)
mcm-web
 
Benutzerbild von deak
 
Registriert seit: Jun 2002
Ort: Germany
Beiträge: 945
jump n run spiel

hi,

bin gerade dabei mich das erstemal mit nem jump n run spiel zu befassen.
benutz dafür das flash mx buch. jetzt meine frage, habe alles so gemacht
wie beschrieben doh leider funkts net. kann mir bitte jemand helfen?

hier mein script:

World = function ( loc, gridsize, map) {
this.loc = loc;
this.gridsize = gridsize;
this.map = map;
}


map = [
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,1,4,1],
[1,0,0,0,4,1,1,1,1,0,0,0,0,2,1],
[1,0,0,0,2,0,0,0,0,1,8,0,0,2,1],
[1,0,0,0,2,0,0,0,0,0,1,0,1,2,1],
[1,0,0,0,2,0,0,0,0,0,0,0,0,2,1],
[1,1,1,0,2,0,0,0,1,0,0,0,0,2,1],
[1,0,0,0,2,0,1,1,1,0,0,1,0,2,1],
[1,9,0,0,2,0,0,1,1,1,1,1,0,2,1],
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
]

JumpNRun = new World ( scene, 14, map);

World.prototype.build = function () {
// Erstelle level daten
}
JumpNRun.build ();

for ( var k = 0; k < this.map.length; k++ ) {
for ( var i = 0; i < this.map[0].length; i++) {
trace ( this.map[k][i] );
// ausgabe array
}
}


SymbolID = "tile"+this.map[k][i];

if ( this.map[k][i] == 9 ) {
trace ("player erstellen und eigenschaften zuweisen");
} else { trace ("Elemente erstellt und posisioniert");
}



this.loc.attachMovie ( "tile" + this.map[k][i],
"tile" + k +"_" + i, num++, {
_x: i * this.gridsize, _y: k * this.gridsize } );

hab auch mal die datei angehängt...
ist extrem wichtig das ich das versteh...soll demnächst ein spiel
als abschluss arbeit machen.


schon mal dank im vorraus
Angehängte Dateien
Dateityp: zip game.zip (5,3 KB, 6x aufgerufen)
deak 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 17:35 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele