5 Replies Latest reply: Mar 25, 2012 8:20 PM by ngourlie RSS

    External SWF won't leave.

    ngourlie Community Member

      So I am trying to make a new flash website for my portfolio (Using Flash Pro CS5.5 with Actionscript 3.0). Obviously to save on load times when someone clicks a portfolio category I want an external SWF to load in and once they leave that page to go back, I want it to go away. Seems simple, yet once my SWF loads, it will not disappear. Here is the link: http://www.nickgourlie.com/flashsite.html To find the problem area click "Portfolio" then "Graphic Design" then "Graphics." My SWF then loads correctly but once you click back to the portfolio or anywhere else, the SWF stays loaded in the background. How do I unload it??

       

      Here is my code where "GraphicsScroller" is my external SWF:

      --------------------

      var myLoader:Loader = new Loader();

      var url:URLRequest = new URLRequest("flashfiles/GraphicsScroller.swf");

      myLoader.load(url);

      addChild(myLoader);

       

       

      // (optional)

      myLoader.x = 125;

      myLoader.y = 132;

      -------------------

       

      Also if you have a better load/unload code that would be better in this situation let me know. I've been messing with different codes for a few days now and I am getting pretty frustrated.

       

      Thanks for any help!