Need a help

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Need a help

    Hi,

    in a for loop, after a PHP query, create multiple instances of a movie clip dynamically, all of which I put into a separate MC as a container, all of which can be quickly deleted.
    But here is the problem. I just can not delete the instances and can not figure it out ...

    HTML code:
    var container: MovieClip = new MovieClip ();
    addChild (container);
    ....
    for (i = 1; i <= 15; i ++) {
    ClassReference: Class = getDefinitionByName ("mc _" + e.target.data ["field" + i]) as Class;
    var instance: MovieClip = new ClassReference ();
    instance.x = posx;
    instance.y = posy;
    container.addChild (instance);
    }
    The ad works wonderfully. The instances should now be deleted at the touch of a button, and the whole thing should start from the beginning ... but what does not work ... The new instances just superimpose [color=black]tellpizzahut[/color] those before.
    I tried removeChild (container), to no avail. Actually, I thought to myself, I just delete the whole container, create again a new one and fill it again with instances .... as I said, does not work. I just do not get the container deleted ... What am I doing wrong ???

    Thanks in advance.
    Zuletzt geändert von Maxjade; 07.08.2019, 21:36.
    [color=black]tellpizzahut[/color]
Lädt...
X