Good Tutorial
(Hinzugefügt am: 12-20-2005 User:
Gast)
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.
(Hinzugefügt am: 02-19-2005 User:
Gast)
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));
}
(Hinzugefügt am: 02-04-2005 User:
Gast)
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.
(Hinzugefügt am: 05-25-2004 User:
Gast)
|