Good Tutorial
(Lisätty: 12-20-2005 Käyttäjä:
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.
(Lisätty: 02-19-2005 Käyttäjä:
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));
}
(Lisätty: 02-04-2005 Käyttäjä:
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.
(Lisätty: 05-25-2004 Käyttäjä:
Guest)
|