Results 1 to 4 of 4

Thread: Loop ?

  1. #1

    Loop ?

    hi can you help me "trace" this

    0
    1
    2

    0
    1
    2

    0
    1
    2

    0
    1
    2

    0
    1
    2

    Ive got 3 balls in Array [red,green,blue] and i want it repeat for 5 times...
    Finally i will see 15 balls red,green,blue, red,green,blue red,green,blue etc..

    thank you

  2. #2
    A nester for condition would suffice for this.

    Code:
    for(var i:int=0;i<5;i++)
    {
        for (var j:int=0;j<3;j++)
        {
            trace(j);
        }
    }

  3. #3
    Quote Originally Posted by excogitator View Post
    A nester for condition would suffice for this.

    Code:
    for(var i:int=0;i<5;i++)
    {
        for (var j:int=0;j<3;j++)
        {
            trace(j);
        }
    }
    Thank you a lot... :-)

  4. #4

    thx

    Quote Originally Posted by excogitator View Post
    A nester for condition would suffice for this.

    Code:
    for(var i:int=0;i<5;i++)
    {
        for (var j:int=0;j<3;j++)
        {
            trace(j);
        }
    }
    Thank you a lot... :-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012