I created this simply code to generate menu:

PHP Code:
0;
dist 40;
for (
i3i++)
{
    
attachMovie ("menuBtn""menuBtn" igetNextHighestDepth (), {_x:50_y:100 + (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.