Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Array problem |
| From: | Ed Harvey |
| Date: | Thu, 08 Mar 2001 15:33:32 -0000 |
I'm having trouble understanding how to use arrays. What I want to do is
take one of the symbol from the array and set it's position on the screen.
Then move onto the next one. When I trace the Array, I get the entire string
when I want just one. This is the script I am using.
square = new Array(6);
square[0] = "A1";
square[1] = "A2";
square[2] = "A3";
square[3] = "A4";
square[4] = "A5";
square[5] = "A6";
count = 0;
pos = pos+10;
while (count<=4) {
trace ("count =" add count);
trace ("pos =" add pos);
trace ("square5=" add square add [count]);
width = getProperty(eval("square" add [count]), _width)+10;
if (eval("square" add [count]) == "A1") {
setProperty (eval("square" add [count]), _y, 0);
setProperty (eval("square" add [count]), _x, pos);
} else {
setProperty (eval("square" add [count]), _y, 0);
setProperty (eval("square" add [count]), _x, pos);
pos = getProperty(eval("square" add [count]), _x);
}
count = count+1;
}
Ed
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

