| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| aahhhhhh Registriert seit: Sep 2002 Ort: Witten
Beiträge: 102
|
Guten Abend zusammen, ich habe nviele Clip Instanzen erzeugt die denn Inhalt eines Datenblattes einer xml Datei wiedergeben. Diese nviele Clips möchte ich wieder löschen sobald das nächste Datenblatt erscheinen soll und nviele neue Clips erzeugt werden sollen. Stattdessen schreibt Flash diese unter das vorige. Hier ein bischen Script: var canon = new XML(); canon.ignoreWhite = true; canon.load("xml/canon.xml"); canon.onLoad = function(status) { if (status) { canon_xml = canon.firstChild.childNodes; delete canon; Liste(); initNavigation(); } }; function Liste() { for (i=aktAnzeige; i<maxAnzeige; i++) { Clip = "clip_daten"+j; attachMovie("clip_daten", Clip, j++); if (canon_xml[i] != undefined) { this[Clip]._x = 15; this[Clip]._y = 200+this[Clip]._height*j; this[Clip].nr.text = canon_xml[i].attributes.nr; this[Clip].bz.text = canon_xml[i].attributes.bz; this[Clip].md.text = canon_xml[i].attributes.md; this[Clip].cl.text = canon_xml[i].attributes.cl; this[Clip].ek1.text = canon_xml[i].attributes.ek1; this[Clip].ek20.text = canon_xml[i].attributes.ek20; this[Clip].ek60.text = canon_xml[i].attributes.ek60; } else { this[Clip].removeMovieClip(); } } if (anzahl<=aktAnzeige+max) { anzeige_txt.text = (aktAnzeige+1)+" / "+anzahl; } else if (anzahl != 0) { anzeige_txt.text = (aktAnzeige+1)+" / "+(aktAnzeige+max); } if (anzahl == 0) { anzeige_txt.text = "0 / 0"; } gesamt_txt.text = "Gesamt: "+anzahl; } function initNavigation() { anzahl = canon_xml.length; max = 20; maxAnzeige = 20; aktAnzeige = 0; } // buttons this.navi.next.onRelease = function() { if (aktAnzeige<anzahl-max) { j = 0; aktAnzeige += max; maxAnzeige += max; Liste(); } }; this.navi.back.onRelease = function() { if (aktAnzeige>1) { j = 0; aktAnzeige -= max; maxAnzeige -= max; Liste(); } }; stop(); Diese erzeugten müssen wieder weg wenn ich das Brother o.ä. Datenblatt sobald in der Zeitleiste die gleichnamige Bildmarke erreicht habe. Jemand einen Tip? Gruß Prize
__________________ [[Der mit den nodes tanzt]] |
| | |
| | #2 (permalink) |
| freundlich ... Registriert seit: Aug 2002 Ort: Berlin
Beiträge: 588
|
hi p, ne einfache lösung ist sowas: bei attachMovie("clip_daten", Clip, j++); alle mcs in einem array speichern: clipsToRemove = []; clipsToRemove.push( attachMovie("clip_daten", Clip, j++); ) und zum entfernen: for( var i = 0; i < clipsToRemove.length; i++ ) clipsToRemove[i].removeMovieClip(); delete clipsToRemove; oder? *m
__________________ the universe wants you to win... |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |