A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F9] for in loop

Hybrid View

  1. #1
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    The for...in loop probably hasn't changed (on a side note, there is supposed to be a new for each loop though), it's the way you access children that has changed. I don't think parentMC[childName] still works, but I haven't tried this. Maybe it works if you set your movieclip-extending-class to dynamic, but that's just a wild guess, and I doubt it.

    You can try to loop i from 0 to mc.numChildren, and use mc.getChildAt(i) - not sure if it will work, but it might.

    If you want to access a child by name, use mc.getChildByName(name) - however, that's no good for a for...in loop.
    Last edited by Fall_X; 07-06-2006 at 04:39 AM.

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