Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 09-11-2003, 09:29   #1 (permalink)
Das Bin Ich
 
Benutzerbild von vincik
 
Registriert seit: Jul 2003
Ort: Basel
Beiträge: 157
remove duplicate

Hallo Leutsz

Eine einfache Frage, bei mir funktioniert es leider noch nicht sp.


Also es werden mcs dupliziert mit:
ActionScript:
  1. for (i=1; i<4; i++) {
  2.     duplicateMovieClip(baum, "mc" add i, i);
  3.     _root["mc"+i]._x = 150*i;
  4.     _root["mc"+i]._y = 350;
  5. }

Und gelöscht mit:

ActionScript:
  1. mc+[i].removeMovieClip
(this)

---
Bei mir funzt das mit dem löschen nicht richtig! Ich möchte nähmlich nicht alle duplizierten löschen, sondern nur dieses das berührt wurde!

Jemand ne Ahnung?

Geändert von vincik (09-11-2003 um 09:30 Uhr)
vincik ist offline   Mit Zitat antworten
Alt 09-11-2003, 09:40   #2 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
ActionScript:
  1. this["mc"+i].removeMovieClip();   //oder
  2. eval("mc"+i).removeMovieClip();
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog ist offline   Mit Zitat antworten
Alt 09-11-2003, 09:54   #3 (permalink)
Das Bin Ich
 
Benutzerbild von vincik
 
Registriert seit: Jul 2003
Ort: Basel
Beiträge: 157
ok!
hat mir nicht viel weiter geholfen:

ActionScript:
  1. onClipEvent (enterFrame) {
  2.     if (_root.man.hitTest(_x+x, _y+y, true)) {
  3.         gotoAndStop(2);
  4.         this["coin"+i].removeMovieClip();
  5.     }
  6. }

hier dupliziert:
ActionScript:
  1. for (i=1; i<4; i++) {
  2.     duplicateMovieClip(coin, "coin" add i, i);
  3.     _root["coin"+i]._x = 150*i;
  4.     _root["coin"+i]._y = 350;
  5. }


oder habe ich das remove flash eingebaut?
lösung
vincik ist offline   Mit Zitat antworten
Alt 09-11-2003, 10:48   #4 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Hmm, also das i in deinem onEnterFrame is nicht bestimmt denk ich mal. Das sollte auch noch in eine Schleife, wenn du das machen willst, wovon ich denke, dass du es machen willst.
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog 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 03:14 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele