Good Tutorial
(à¾ÔèÁä»áÅéÇ: 12-20-2005 ¼Ùéãªé:
Guest)
But it is very usefull if you want to insert arrays into flash with javascript which you can't do directly. But if you set each var like: array[1] => array1 then you can use this function to get your original array back.
(à¾ÔèÁä»áÅéÇ: 02-19-2005 ¼Ùéãªé:
Guest)
for(i = 1; i<=5; i++){
//current variable
curr_var = eval(pic + '' + i); _root.addProperty("pic" + i, get, set);
//handle variable…pic1, pic1, etc
setProperty("_root.pic" + i, value, "Value: " + i);
}
//===>
for (i = 1; i<= 5; i++) {
trace(eval("_roo.pic" + i));
}
(à¾ÔèÁä»áÅéÇ: 02-04-2005 ¼Ùéãªé:
Guest)
Much as this tutorial offers useful advice, it is very bad programming practise to do what is done above.
Use arrays instead. Eval was put in actionscript before arrays were put in. Between arrays and ["property"] eval is practially useless. It is only needed in advanced techniques.
(à¾ÔèÁä»áÅéÇ: 05-25-2004 ¼Ùéãªé:
Guest)
|