dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: (AS3) Using For Loop with repeated visible test

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    37

    (AS3) Using For Loop with repeated visible test

    Getting straight to the point this is what i want to do:
    Code:
    for (var i:Number=0; i<28; i++)
    {
    if (isMap[i] == 1)
    {
    display.label[i].visible = true;
    }
    else
    {
    display.label[i].visible = false;
    }
    }
    I want it to check an array slots then compare it to the display.label1, then display.label2 so on so forth. Except, it doesn’t work =\ anything im doing wrong? Or does flash not suppose this kind of coding?

  2. #2
    Member
    Join Date
    Jan 2008
    Posts
    37
    nvm i figured it out.
    the problem was the display.label[i].visible
    should have been display["label"+i].visible

Tags for this Thread

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