A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Load Movie loop not working

  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    8

    Load Movie loop not working

    First time poster - hope this forum is still getting some use.

    I'm trying to create a "for" loop to load thumbs into existing movie clips using the following code:

    var total=17;
    for (i=8; i<=total; i++) {
    loadMovie("thumbs/thumb"+[i]+".jpg",_root.thumb[i]);
    trace (i);
    }

    This should load thumbs 9-17. The trace shows the variable is incrementing but I'm not getting the thumbs to load. Any thoughts would be greatly appreciated.

    J

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    Code:
    loadMovie("thumbs/thumb"+i+".jpg",_root["thumb"+i]);
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Junior Member
    Join Date
    Feb 2009
    Posts
    8

    Perfect

    Thanks so much. Not sure why the target must be grouped with the variable but whatever works. Thanks again.

    J

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