A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Substitution blues

  1. #1
    Junior Member
    Join Date
    Nov 2001
    Posts
    25
    I've a number of varibles like this


    player0="name"
    player1="another"
    player2="more"
    etc
    etc

    and I'd like to deal with these in a loop

    ie

    for (i=0; i<10; i++)
    {
    this="player" + i;
    _root["msg"]=this
    }

    but this just gives me "player0", "player1" etc in msg.. and not "name" , "another"

    how can I see the Substitution for "player0" ?



















  2. #2
    Junior Member
    Join Date
    Sep 2001
    Posts
    20
    this = eval("player" + i);

  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    36
    Dunno if this will help but hey, here goes

    for (i=0; i<10; i++)
    {
    _root["msg"]=["player" + i];
    }

    I guess... dunno... maybe...

    Good Luck...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center