set("name", "Jakob");
trace(name);
The following code loops three times and creates three new variables, called
,
,
caption0
caption1
and
:
caption2
for (var i = 0; i<3; i++) {
set("caption"+i, "this is caption "+i);
}
trace(caption0);
trace(caption1);
trace(caption2);
See also
var,
call()
730
Chapter 2: ActionScript Language Reference
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?