rendered paste bodyfragen = Array(
Array("frage1",
Array(
Array(0, "antwort1.1"),
Array(1, "antwort1.2"),
Array(1, "antwort1.3"),
Array(0, "antwort1.4")
)
),
Array("frage2",
Array(
Array(1, "antwort2.1"),
Array(0, "antwort2.2"),
Array(0, "antwort2.3"),
Array(0, "antwort2.4")
)
)
);
// gefüllt über checkboxen oder buttons o.ä.
antworten = Array(
0,
1,
1,
1
)
// angenommen die aktuelle frage wäre 0
aktuellefrage = 0;
// abfrage ob alle antworten richtig sind
function abfragen() {
ergebnis = true;
for(i=0; i<4; i++) {
if (fragen[aktuellefrage][1][i][0] != antworten[i]) {
ergebnis = false;
break;
}
}
trace(ergebnis);
}
// aufruf
abfragen();