Tema: Re: functions in array
Autorius: overdosed
Data: 2009-02-24 09:52:19
negarantuoju, bet esu linkes manyti, kad turetu veikti toks principinis 
variantas:

aFuncArray.push(new Function()..);
aFuncArray.push(new Function()..);

for(i){
    buton(i).onRelease = aFuncArray[i];
}


"celsyum" <celsyum@mmmmmm.lt> wrote in message 
news:gnubfm$bm3$1@trimpas.omnitel.net...
> viena varianta sugalvojau , tai funkcijas aprashyt funkcijoj :?
> function parentFunction(numm:Number)
> {
> switch(numm)
> {
> case 0;
> callMe();
> break;
> case 1:
> ...
> brea;
> }
> }
> function callMe()
>    {
>     textField.text = "lawl";
>    }
>
> for (i = 0; i < butnumber; i++)
> {
> this['botton'+i].fnumber = i;
> this['botton'+i].onRelease = function()
> {
>   _root.parentFunction(this.fnumber);
> }
> }
>
> gal yra dar geresniu variantu ?