I created this simply code to generate menu:
PHP Code:
i = 0;
dist = 40;
for (i; i < 3; i++)
{
attachMovie ("menuBtn", "menuBtn" + i, getNextHighestDepth (), {_x:50, _y:100 + (i * dist)});
}
Than I approach first btn with this code:
PHP Code:
menuBtn0.onRelease = function ()
{
trace ("called");
};
Can I use insteade btn name menuBtn0 use some dynamic name?
I mean if I write access to btn with its name and than I generate instead 3 e.g 50 btns I need to rewrite the code for btn events.
I hope u understand what I mean.