| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Jun 2005
Beiträge: 7
| DRINGEND Hilfe zum Racinggame -Actionscript-
hi leute bin grad dabei unser Projekt zu dokumentieren (F1^-Racing Game). Nur mein Projektpartner ist im Krankenhaus und ich muss folgenden Actionscriptcode dokumentieren u. vorstellen. Kenn mich da net so aus. Des einzige was ich habe ist folgender Actionscriptcode im MainMovie: // Action script... // [Action in Frame 2] if (_framesloaded < _totalframes) { gotoAndPlay(1); } // end if // [Action in Frame 3] function order(a, b) { var time1 = Number(a.split(":")[1]); var time2 = Number(b.split(":")[1]); if (time1 == 0) { time1 = 999; } // end if if (time2 == 0) { time2 = 999; } // end if if (time1 < time2) { return(-1); } else if (time2 < time1) { return(1); } else { return(0); } // end if } // End of the function function displayQualifying() { car1._x = xpos[0]; car1._y = 345; car2._x = xpos[1]; car2._y = 345; car3._x = xpos[2]; car3._y = 345; car4._x = xpos[3]; car4._y = 345; car1._rotation = 90; car2._rotation = 90; car3._rotation = 90; car4._rotation = 90; } // End of the function function displayRace() { for (x = 3; x > -1; x--) { gpos = thegrid.pop().split(":")[0]; eval("car" + gpos)._x = xpos[x]; eval("car" + gpos)._y = ypos[x]; } // end of for car1._rotation = 90; car2._rotation = 90; car3._rotation = 90; car4._rotation = 90; } // End of the function function destroyCars() { _root.car1.removeMovieClip(); _root.car2.removeMovieClip(); _root.car3.removeMovieClip(); _root.car4.removeMovieClip(); } // End of the function function initDrivers() { destroyCars(); if (vspeedguide == 1) { driver1 = "s1"; } else { driver1 = "h1"; } // end if if (vplayers == 2) { if (vspeedguide == 1) { driver2 = "s2"; } else { driver2 = "h2"; } // end if } else { driver2 = "ai1"; } // end if if (vplayers == 2) { driver3 = "ai1"; } else { driver3 = "ai2"; } // end if if (vplayers == 2) { drivers = ["Schumi", "Rubens", "Mika", "DC"]; driver4 = "ai3"; } else { drivers = ["Schumi", "Mika", "DC", "Rubens"]; driver4 = "ai4"; } // end if _root.attachMovie(driver1, "car1", 1); _root.attachMovie(driver2, "car2", 2); _root.attachMovie(driver3, "car3", 3); _root.attachMovie(driver4, "car4", 4); } // End of the function function convert(tm) { var mns; var mns2; var scs; mns = tm / 60; mns2 = Math.floor(mns); scs = (mns - mns2) * 60; return(mns2 + ":" + String(scs).substr(0, 6)); } // End of the function function showResults() { for (x = 0; x < 4; x++) { gdata = thegrid[x].split(":")[1]; gdriver = thegrid[x].split(":")[0]; glap = thegrid[x].split(":")[2]; eval("rs" + (x + 1)) = x + 1 + ". " + drivers[gdriver - 1] + " [" + convert(Number(gdata)) + "] - " + glap + " laps"; } // end of for } // End of the function // [Action in Frame 4] cars = 4; xpos = [175, 135, 95, 55]; ypos = [335, 355, 335, 355]; vlaps = 10; vqualifying = 1; vspeedguide = 2; vplayers = 1; destroyCars(); stop(); // [Action in Frame 5] prevFrame(); // [Action in Frame 6] initDrivers(); displayQualifying(); // [Action in Frame 22] starttime = getTimer(); // [Action in Frame 23] qtime = (getTimer() - starttime) / 1000; tleft = vqualifying * 60 - qtime; if (tleft < 0.001000) { tleft = 0; } // end if tleft = String(tleft) + "000"; timeleft = tleft.substr(0, 6); // [Action in Frame 24] if (timeleft != 0) { gotoAndPlay(23); } // end if // [Action in Frame 25] thegrid = new Array(); thegrid.push("1:" + car1.fastestlap / 1000 + ":" + car1.lap); thegrid.push("2:" + car2.fastestlap / 1000 + ":" + car2.lap); thegrid.push("3:" + car3.fastestlap / 1000 + ":" + car3.lap); thegrid.push("4:" + car4.fastestlap / 1000 + ":" + car4.lap); thegrid.sort(order); showResults(); stop(); // [Action in Frame 26] initDrivers(); displayRace(); lapsdone = 0; endrace = 0; playerlap = ""; // [Action in Frame 42] starttime = getTimer(); // [Action in Frame 43] qtime = (getTimer() - starttime) / 1000; tleft = vqualifying * 30 - qtime; if (tleft < 0) { tleft = 0; } // end if timeleft = tleft; // [Action in Frame 44] if (endrace < 4) { gotoAndPlay(43); } // end if // [Action in Frame 45] thegrid = new Array(); thegrid.push("1:" + car1.racetime / 1000 + ":" + car1.lap); thegrid.push("2:" + car2.racetime / 1000 + ":" + car2.lap); thegrid.push("3:" + car3.racetime / 1000 + ":" + car3.lap); thegrid.push("4:" + car4.racetime / 1000 + ":" + car4.lap); thegrid.sort(order); showResults(); stop(); Kann mir einer helfen das zu dokumentieren???? Wäre euch sehr sehr dankbar Gruss ENCY |
| | |
| | #2 (permalink) |
| helpQLODhelp Registriert seit: Feb 2002 Ort: Köln
Beiträge: 8.505
|
LOL, das ist ja noch Flash 4. Da hättet ihr aber schon genung Zeit gehabt, das mal zu kommentieren Die vorhandenen Kommentare sehen irgendwie nach Decompiler aus, die Fla habt ihr wohl auch nicht mehr, oder? mfg r.
__________________ Ralf Bokelberg™ - Flex & Flash Consulting |
| | |
| | #3 (permalink) |
| Neuer User Registriert seit: Jun 2005
Beiträge: 7
|
doch doch...haben halt ne fla erhalten und sollen diese nun dokumentieren....und es als vorlage für ein neues spiel benutzen fla hier :http://service.gmx.net/mc/6ylXBLHVul...Hp9hnNcDFZGdQT f1.fla |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |