0 Replies Latest reply on Aug 19, 2007 11:02 AM by lichtjiang

    How to remove things from stage and release memory?

      I need a movie that changes from time to time what is shown on stage, including text boxes and movie clips. That is, things displayed now should be removed and replaced by different things next to be displayed. They may appear at either the same or different positions and my occupy different places. All these objects should be dynamically created by using AS code.

      So, I am thinking how to do that with the following consideration:
      - remove visible object from stage; (so, they disappear from stage)
      - remove memory they consume; (so, it will not happen that too many objects do not release memories until no memory is available, when the movie is played a very long time)
      - want the depth to be decreased when objects at that depth are removed. (so, depth value will not overflow, though I guess this will never happen when this movie is played. just for curiosity, what is a good way to handle depth when new visible objects keep showing up and replacing old ones.)