Zurück   Flashforum > Flash > Flash Einsteiger

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 12-12-2011, 18:04   #1 (permalink)
czc
Neuer User
 
Registriert seit: Feb 2006
Beiträge: 222
Schleife mit AS2

Hallo,

ich benötige Hilfe.

Wie kann man folgendes als Schleife reduzieren?

ActionScript:
  1. on(press){
  2.     if(image_number_input.text == 1){
  3.         gotoAndStop(20);
  4.         }
  5.     if(image_number_input.text == 2){
  6.         gotoAndStop(30);
  7.         }
  8.     if(image_number_input.text == 3){
  9.         gotoAndStop(40);
  10.         }
  11.     if(image_number_input.text == 4){
  12.         gotoAndStop(50);
  13.         }
  14.     if(image_number_input.text == 5){
  15.         gotoAndStop(60);
  16.         }
  17.     if(image_number_input.text == 6){
  18.         gotoAndStop(70);
  19.         }
  20.     if(image_number_input.text == 7){
  21.         gotoAndStop(80);
  22.         }
  23.     if(image_number_input.text == 8){
  24.         gotoAndStop(90);
  25.         }
  26.     if(image_number_input.text == 9){
  27.         gotoAndStop(100);
  28.         }
  29.     if(image_number_input.text == 10){
  30.         gotoAndStop(110);
  31.         }
  32.     if(image_number_input.text == 11){
  33.         gotoAndStop(120);
  34.         }
  35.     if(image_number_input.text == 12){
  36.         gotoAndStop(130);
  37.         }
  38.     if(image_number_input.text == 13){
  39.         gotoAndStop(140);
  40.         }
  41.     if(image_number_input.text == 14){
  42.         gotoAndStop(150);
  43.         }
  44.     if(image_number_input.text == 15){
  45.         gotoAndStop(160);
  46.         }
  47.     if(image_number_input.text == 16){
  48.         gotoAndStop(170);
  49.         }
  50. }

Geändert von czc (12-12-2011 um 18:05 Uhr)
czc ist offline   Mit Zitat antworten
Alt 12-12-2011, 19:26   #2 (permalink)
Euer Nuser
 
Benutzerbild von ~pyropete~
 
Registriert seit: Apr 2004
Ort: Sand-City
Beiträge: 3.483
Geht auch ohne.

PHP-Code:

on
(press) {

 
_framenumber image_number_input.text 10 10
 
trace("_framenumber = "+_framenumber);
 
gotoAndStop(_framenumber);


~pyropete~ ist offline   Mit Zitat antworten
Alt 12-12-2011, 21:26   #3 (permalink)
czc
Neuer User
 
Registriert seit: Feb 2006
Beiträge: 222
Klasse ;-) Danke.
czc 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


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Schleife 45miles Flash MX 4 27-06-2006 15:05
for-schleife in for-schleife/variablen zusammenbauen stuertz ActionScript 1 2 26-01-2006 19:42
x-pos anordnen innerhalb schleife/array, onEnterFrame innerhlab schleife? andretti ActionScript 1 9 15-06-2005 09:26
attachMovie + if-schleife/for-schleife bestboy ActionScript 1 9 12-02-2005 18:54
for schleife ?? superheftig ActionScript 1 2 27-05-2002 13:07


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:23 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele