0

I need to loop through all the child inside a .fla file, and I can reach only the first frame movieclips when I loop through the childs, I found a "solution" that consists in copy all the movieclips to the first frame.. but, it sucks :p

Is there a way to loop to every movieclip, even if those are located in, let say, frame 120 in the timeline?

Thanks!

Artemix
  • 8,497
  • 14
  • 48
  • 75
  • 2
    Personally I think you should shy away from using the timeline when making a flash application. – Taurayi Sep 08 '11 at 14:53
  • Not true, it makes it easy for the designers to edit the .fla while the programmers are working on the code, if well organized, of course. – Artemix Sep 08 '11 at 15:00

2 Answers2

1

No, there's not. The movieclips on any given frame don't actually get created until that frame is reached. If you really need a reference on frame 1, the only way is to make sure they exist on frame 1, as you have already found as your solution.

HotN
  • 4,216
  • 3
  • 40
  • 51
0

Like HotN and Taurayi said, I say it too: You should not use MAIN timeline. An useful alternative for working nice with designers, is making a better organization of your FLA. You could, for example, let all movieclips in 1st frame, and controll them all with your code. All elements that aren't shown in first frame, you can change it's alpha/visible property.

Marcelo Assis
  • 5,136
  • 3
  • 33
  • 54