Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 11-07-2004, 20:04   #1 (permalink)
Neuer User
 
Registriert seit: Sep 2002
Beiträge: 71
Anweisung abkürzen

Hallo Leute !

wie kann ich diese Anweisung abkürzen ?
PHP-Code:
on (release) {
        
_root.anzahl _root.anzahl-1;
        if (
_root.name1 == "Motorhaube") {
            
_root.name1 "";
            
_root.produkt1 "";
        }
        if (
_root.name2 == "Motorhaube") {
            
_root.name2 "";
            
_root.produkt2 "";
        }
        if (
_root.name3 == "Motorhaube") {
            
_root.name3 "";
            
_root.produkt3 "";
        }
        if (
_root.name4 == "Motorhaube") {
            
_root.name4 "";
            
_root.produkt4 "";
        }
        if (
_root.name5 == "Motorhaube") {
            
_root.name5 "";
            
_root.produkt5 "";
        }
        if (
_root.name6 == "Motorhaube") {
            
_root.name6 "";
            
_root.produkt6 "";
        }
        if (
_root.name7 == "Motorhaube") {
            
_root.name7 "";
            
_root.produkt7 "";
        } 
Herzlichen Dank im voraus

Geändert von DerBauer1234 (11-07-2004 um 20:06 Uhr)
DerBauer1234 ist offline   Mit Zitat antworten
Alt 11-07-2004, 20:07   #2 (permalink)
Flash & TYPO3
 
Registriert seit: Oct 2003
Ort: Bayern
Beiträge: 2.700
Code:
on(release) {
   for(i=1; i<deineAnzahl; i++) {
      if(_root["name"+i] == "motorhaube") {
         // to do
      }
   }
}
Das ist das Prinzip. Versuch dich einfach mal bissl! Learning by doing!
__________________
Mediendesign-Student
johanness ist offline   Mit Zitat antworten
Alt 11-07-2004, 20:10   #3 (permalink)
hmmmmm...
 
Benutzerbild von kenichi
 
Registriert seit: Feb 2004
Ort: deutschland
Beiträge: 112
hi,

PHP-Code:
for(var i=1i<=7i++) {
    if(
_root["name" i] == "Motorhaube") {
        
_root["name" i] = "";
        
_root["produkt" i] = "";
    }

hoffe das hilft weiter...

gruss,
kenichi
__________________
Visit Amakiir.net - WoW Community and more!
kenichi ist offline   Mit Zitat antworten
Alt 11-07-2004, 20:11   #4 (permalink)
hmmmmm...
 
Benutzerbild von kenichi
 
Registriert seit: Feb 2004
Ort: deutschland
Beiträge: 112
huch,

da war wohl jemand schneller als ich... ;o)
__________________
Visit Amakiir.net - WoW Community and more!
kenichi ist offline   Mit Zitat antworten
Alt 12-07-2004, 18:30   #5 (permalink)
Neuer User
 
Registriert seit: Sep 2002
Beiträge: 71
Danke

Herzlichen Dank
DerBauer1234 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 09:41 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele