Welcome to WebmasterWorld Guest from 54.159.140.188

Forum Moderators: open

Message Too Old, No Replies

Variable Instance Names

Use a variable as an instance name.

     
2:42 pm on Aug 29, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:June 16, 2007
posts: 120
votes: 0


Hello. I am attempting to use a variable in an instance name.

platforms=1;
while(platforms<3){
platformNum = "platform"+platforms;
platformX=_root.var(platformNum)._width;
}

I attempted the above code, but I am told that a '.' is expected after the operator. If you have any ideas, please help. Thanks.