all groups > macromedia flash flash remoting > september 2005 >
You're in the

macromedia flash flash remoting

group:

getItemAt(0).data issue


getItemAt(0).data issue Tudor
9/8/2005 11:17:27 PM
macromedia flash flash remoting:
hey everyone,
I'm currently trying to simplify my life a little by using eval in
conjunction with a for loop to lighten the number of things I have to write
down a little.
Here is what I'm doing and I guess I need help understanding why it doesn't
work as well as a suggestion on how to fix it. :)

Normally I could do something like this

for (i = 0; i<1000; i++) {
stickyNote_mc._x = stickyNoteInfo_lb.getItemAt(i).data.posX;
}

and everyone would be happy... the problem is I'm trying to do this.


for (i = 0; i<1000; i++) {
myArray[i] = eval("stickyNoteInfo_lb.getItemAt(0).data.posX" + i );
}

and this just doesn't work. Essentially I have a need for about 100
different columns in my database all called posX1 --> posX100 and I don't
want to have to set each one of them individually or I'll go crazy.

I'm concerned about the right hand side of the = sign just to be clear.

Thanks in advance for any and all help.

Regards,
Tudor

Re: getItemAt(0).data issue Tudor
9/9/2005 8:51:59 AM
additionally this does not work either
for (i = 0; i<1000; i++) {
myArray[i] = stickyNoteInfo_lb.getItemAt(0).data["posX" + i];
}
Help...anyone :)
Large box of virtual girl guide cookies are in it for you... seriously...
they taste twice as good with none of the calories.

[quoted text, click to view]

AddThis Social Bookmark Button