3 Replies Latest reply on Jul 19, 2007 10:36 PM by Newsgroup_User

    ._visible=false

    jonnybennett Level 1
      If I attach a lot of m.c's to the stage, and then make them invisible, by using ._visible, this doesn't free up anything, as the performance is slowed down. The only way to stop the movie from being slowed down is to remove the m.c. not make i tinvisible.

      is there an inbetween? a way that will remove the m.c. but at the same time rember its state like with ._visible.

      I hope people understand what Ieman, thanks to any respnders J.
        • 1. Re: ._visible=false
          Rothrock Level 5
          Not sure what your movies are doing that slow down performance. I would think something not visible should speed up any rendering that it was taking – like if it had alpha and masking etc. But if it has code – onEnterFrame, code on its own timeline, etc. That code will still be executing and taking processor cycles.

          Of course if it is still in memory it will use up memory. So to free memory you will need to remove it.

          What are you doing that is making things too slow? My guess is that its some code.
          • 2. Re: ._visible=false
            jonnybennett Level 1
            Thanks Rothrock.

            I have an entire search page that is a m.c.
            When someone clicks off this page I am trying to keep the results that are on that page in the memory. To do this I am simply setting the search results to visible=false, therefore when some clicks back on the search page, it still has the last looked at search results, without having to refresh.

            However it appears to be slowing down the perfromance. The search page has some mc's attached to it that have onEnter frame functions. Perhaps I will lokk at these.
            thanks for your response. J.
            • 3. Re: ._visible=false
              Level 7
              Hi Jonny,

              If these clips are running onEnterFrame handlers (or timers), these
              could hit the processor even if they're invisible. The best solution is
              to add a clause to the onEnterFrame handlers to stop them running when
              visibility is turned off. Something to the effect of:

              this.onEnterFrame=function() {
              //...do something
              if (!this._visible {
              this.onEnterFrame=undefined;
              }
              }

              You'll need to re-enable them when returning though so keep that in mind.

              Regards,
              Patrick

              --
              http://www.baynewmedia.com
              Faster, easier, better...ActionScript development taken to new heights.
              Download the BNMAPI today. You'll wonder how you ever did without it!
              Available for ActionScript 2.0/3.0.

              jonnybennett wrote:
              > Thanks Rothrock.
              >
              > I have an entire search page that is a m.c.
              > When someone clicks off this page I am trying to keep the results that are on
              > that page in the memory. To do this I am simply setting the search results to
              > visible=false, therefore when some clicks back on the search page, it still has
              > the last looked at search results, without having to refresh.
              >
              > However it appears to be slowing down the perfromance. The search page has
              > some mc's attached to it that have onEnter frame functions. Perhaps I will lokk
              > at these.
              > thanks for your response. J.
              >