A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] [F8] referencing Array of objects

  1. #1
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80

    resolved [RESOLVED] [F8] referencing Array of objects

    Ive done this before, but I forget teh notations. I have objcts date1,date2..... save as a movieclip dateBoxes. I cant remember how to referencec them, say, in a for loop.

    for (i=0; i==10; i++) {
    dateBoxes.["date" + i].text = i;
    }

    Like that but it has to work lol.

    thanks in advance.

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    very close but lose the dot i.e:

    Code:
    for (i=0; i==10; i++) {
    dateBoxes["date" + i].text = 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
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80
    I tried using that for somthign else

    I have a mc "panel" with "thumb1" to "thumb16"

    I tried:

    var thumbArray = new Array();

    for (i=1; i<=16; i++) {
    thumbArray.push(panel["thumb" + i]);
    }

    but it didnt work.

  4. #4
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    syntactically i dont see anything wrong with your above code... what makes u think it's not working? you may have to post some more code or explain in more detail what you are trying to do..
    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

  5. #5
    Member
    Join Date
    Nov 2003
    Location
    Ontario, Canada
    Posts
    80
    Nevermind, I must have misstyped somthing the code works. Thanks Silent. BTW I sent you a PM about somthing since you know alot about this. I also made a threat its "Flash to Flash".

    Now how od I mark this as resolved?

  6. #6
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    your welcome, glad i could help
    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

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