Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 03-03-2006, 15:02   #1 (permalink)
ActionScriptler
 
Benutzerbild von .:morpher:.
 
Registriert seit: Jun 2002
Ort: auheim
Beiträge: 1.654
Verschachtelte If-schleifen

Hi Leute!
habt Ihr eine Ahnung, warum bei folgendem Code, die Variablen nicht richtig gefüllt werden?
ActionScript:
  1. next_btn.onRelease = function() {
  2.     if (your_name.text != "" && your_name.text != "(YOUR NAME)") {
  3.         if (your_phone.text != "" && your_phone.text != "(your phone") {
  4.             if (your_mail.text != "" && your_mail.text != "your e-mail)") {
  5.                 pnc_user_Data.user_name = your_name.text;
  6.                 pnc_user_Data.user_phone = your_phone.text;
  7.                 pnc_user_Data.user_mail = your_mail.text;
  8.                 gotoAndPlay("title", 1);
  9.                 Key.removeListener(keyEingabe);
  10.             }
  11.             if (your_mail.text == "" || your_mail.text == "your e-mail)") {
  12.                 pnc_user_Data.user_name = your_name.text;
  13.                 pnc_user_Data.user_phone = your_phone.text;
  14.                 pnc_user_Data.user_mail = "";
  15.                 gotoAndPlay("title", 1);
  16.                 Key.removeListener(keyEingabe);
  17.             }
  18.         }
  19.         if (your_mail.text != "" && your_mail.text != "your e-mail)") {
  20.             if (your_phone.text != "" && your_phone.text != "(your phone") {
  21.                 pnc_user_Data.user_name = _root.your_name.text;
  22.                 pnc_user_Data.user_phone = your_phone.text;
  23.                 pnc_user_Data.user_mail = your_mail.text;
  24.                 gotoAndPlay("title", 1);
  25.                 Key.removeListener(keyEingabe);
  26.             }
  27.             if (your_phone.text == "" && your_phone.text == "(your phone") {
  28.                 pnc_user_Data.user_name = your_name.text;
  29.                 pnc_user_Data.user_phone = "";
  30.                 pnc_user_Data.user_mail = your_mail.text;
  31.                 gotoAndPlay("title", 1);
  32.                 Key.removeListener(keyEingabe);
  33.             }
  34.         }
  35.     }
  36. };

während es bei folgendem Code geht:
ActionScript:
  1. next_btn.onRelease = function() {
  2.     if (your_name.text != "" && your_name.text != "(YOUR NAME)" && your_phone.text != "" && your_phone.text != "(your phone" && your_mail.text != "" && your_mail.text != "your e-mail)") {
  3.         pnc_user_Data.user_name = your_name.text;
  4.         pnc_user_Data.user_phone = your_phone.text;
  5.         pnc_user_Data.user_mail = your_mail.text;
  6.         gotoAndPlay("title", 1);
  7.         Key.removeListener(keyEingabe);
  8.     }
  9. };
__________________
CU @ MY SITE

FOLLOW ME ON TWITTER
.:morpher:. ist offline   Mit Zitat antworten
Alt 03-03-2006, 15:29   #2 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
kann sein dass der bei der ersten positiven prüfung aussteigt...
versuchs mal mit else if
__________________
gruß bloba

2 x onkel² b_d
bloba 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 14:26 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele