PDA

View Full Version : Remove All Movie Clips


LostInRecursion
09-17-2004, 02:17 PM
Hi all,

In my application, I build a layout of seats depending on the user's selection. The number of seat movie clips ranges from 100 - 600 for any one section.

I use a setInterval to build my seats and assign them properties based on the Seat class I created which extends MovieClip.

When a user clicks a new section, how can I remove all the MovieClips in one shot?

I don't think a for loop will work in case the section is large. It could freeze the player. Any other suggestions?

-K

Tink
09-17-2004, 03:05 PM
how bout when u are attaching them, you attch them all inside another main clip. then just remove tha main clip.

LostInRecursion
09-17-2004, 03:47 PM
Actually the seats are loaded into a Scroll Pane - But the function lives in there so I wasn't sure how to maintain state once I unload the SWF.

Tink
09-17-2004, 05:08 PM
how bout you put another clip inside the scrollPane, the attach them all inside this clip, then just remove this clip.

LostInRecursion
09-17-2004, 08:41 PM
Perfect. It's always something simple isn't it? Thanks!

-K