dimanche 4 décembre 2016

How to make visible infinite movieclips with one button?

I hope that someone can help me getting this done because I'm freaking out.

I'm working on an interactive map in Actionscript-3 (Adobe Flash CS6).

What I'm trying to do is, with a single button, to make visible an infinite number of objects (movieclips) with each mouse click (on the button).

I'm currently working with this code, but I can't manage to find out how to make visible and infinite number of movieclips, I can only make visible ONE:

btn_ally_unit.addEventListener(MouseEvent.CLICK, mostrar_ally_unit2);

function mostrar_ally_unit2(event:MouseEvent):void
{
    map_editor.ally_unit.visible = true;

}   

Maybe this is not the way to go through it, but I'm totally lost right now.

I would really appreciate any help. THANK YOU

Aucun commentaire:

Enregistrer un commentaire