A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: drawing in FOR loop

  1. #1
    No title shall i give thee!
    Join Date
    Oct 2003
    Location
    Estonia
    Posts
    41

    drawing in FOR loop

    for(i=0;i<10;i++){
    _root.createEmptyMovieClip(i, 1)
    root[i].moveTo(100, 100)
    root[i].lineStyle(1)
    root[i].lineTo(200+i*20, 200+i*20)
    }

    i know there is something terribly wrong in this source, i just want to make 10 lines in FOR loop and all in different MCs (i)... HOW?!
    maybe you huys understand what i want and help me

  2. #2
    Can i play now????
    Join Date
    Jun 2003
    Location
    Greece
    Posts
    309
    code:

    for (i=0; i<10; i++) {
    _root.createEmptyMovieClip(i, i);
    _root[i].lineStyle(1);
    _root[i].moveTo(100, 100);
    _root[i].lineTo(200+i*20, 100+i*20);
    }


    This works.
    Mess With The Best, Die Like The Rest...

  3. #3
    No title shall i give thee!
    Join Date
    Oct 2003
    Location
    Estonia
    Posts
    41
    HAHAH thanks... these mistakes were so like... obvious, that i'll now kiss the world goodbye and live on alone in the corner with my shame

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