4 Replies Latest reply on Aug 14, 2007 8:12 AM by pcbryant

    Refreshing swf

    pcbryant
      I have an AS3 swf file which loads in AS2 swfs. These AS2 files are very memory intensive and load in many AS2 swf's into them. As these swf's are so memory intensive I am wanting to be able to completely flush out the memory. I used to be able to do a _level0.loadmovie and load itself, not pretty but it did the job. In AS3 there doesn't seem to be any similar method. Simply unloading and deleting the clip doesn't release anything from memory instantly and this can then end up causing the a huge memory problem leading to the swf's running at a very, very poor frame rate.

      Does anybody know of any way of being to overcome this problem.
        • 1. Re: Refreshing swf
          kglad Adobe Community Professional & MVP
          you must null all references to your as2 file(s), as well as, remove them from the display list. you can force garbage collection by increasing your swf's memory usage.

          i know you think memory usage is already a problem but, from your description, that's not as likely as a cpu usage problem.
          • 2. Re: Refreshing swf
            pcbryant Level 1
            mmmm. Having done some tests and making sure that that all the references are nulled the memory usage does drop, but the frame rate of swf's drops vastly the more times I load something in. I really don not want to have to refresh the web page itself everytime I change swfs. The main reason for me to do this is so the user can change between the products while they are in full screen mode.

            Does anybody out there have any answers or does anyone how I can contact Adobe technical support for some help. I have tried various telephone numbers from the site but to now avail, either nobody wants to know or I just get a recorded message.
            • 3. Re: Refreshing swf
              kglad Adobe Community Professional & MVP
              if the frame rate is affected you're probably not clearing some loops. check for setInterval and onEnterFrame loops that are not being cleared.
              • 4. Re: Refreshing swf
                pcbryant Level 1
                The problem is down to the amount of videos that each application is loading. Each now can load down a possbile 50mg of videos as well as running hardcore game code at the same time.
                They are all very CPU intensive apps. In the past we got around the problem by simply refreshing the webpage, this option is not available as I want to remain in full screen mode whilst I change application.
                Any ideas,thoughts, pointers?