Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 30-07-2003, 14:31   #1 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
sendandload - variablenübernahme?

hallo!

in meinem flash prog, lese ich per sendandload eine variable "lose" ein:
ActionScript:
  1. Formular = new LoadVars();
  2. Formular.cmd = "startflashgame";
  3. Formular.sendAndLoad("script.php", Formular, "POST");
  4. Formular.onLoad = function(erfolgreich)
  5. {
  6.     if (erfolgreich == true && Formular.lose == "1")
  7.     {
  8.         gotoAndPlay("go1");
  9.     }
  10.     else
  11.     {
  12.         gotoAndPlay("fehler");
  13.     }
  14. }

ebenso wird vom php-script auch eine variable "id" mitgesendet, die ich im weiteren verlauf wieder an das script zurücksenden muss.
momentan mache ich das so:
ActionScript:
  1. Formular2 = new LoadVars();
  2. Formular2.cmd = "endflashgame";
  3. Formular2.id = Formular.id;
  4. Formular2.sendAndLoad("script.php", Formular2, "POST");
  5. Formular2.onLoad = function(erfolgreich)
  6. {
  7.     //if (erfolgreich) {trace(Formular.id);}
  8. }

allerdings ist die variable leer.
-> das trace bringt nix, da ja ein server benötigt wird...

sendandload funktioniert also, aber eben nicht das umgehen mit der variable...

kann mir einer helfen?

ps: brauch ich das eigentlich, oder kann ich es weglassen/vereinfachen?
ActionScript:
  1. Formular2.onLoad = function(erfolgreich)
  2. {
  3.     //if (erfolgreich) {trace(Formular.id);}
  4. }
__________________
Das Newslettersystem auf deiner Homepage!
rok°! ist offline   Mit Zitat antworten
Alt 30-07-2003, 15:00   #2 (permalink)
rookie
 
Benutzerbild von rok°!
 
Registriert seit: Apr 2002
Beiträge: 370
Unhappy

hat sich erledigt - oh mann! die variable "id" war leer - kein wunder, dass dann nichts mehr zurückgegeben werden konnte!
__________________
Das Newslettersystem auf deiner Homepage!
rok°! 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 06:33 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele