2 Replies Latest reply: May 3, 2010 11:33 AM by Ned Murphy RSS

    removing movie clip in a frame

    I Love Doing Websites Community Member

      Hello,

       

      I have a timeline with 12 frames, in frame 7 I added a movie clip to the  stage:

      var pContainer:MovieClip = new MovieClip;
      addChild(pContainer);
      var myLoader1:Loader = new Loader();

      pContainer.addChild(myLoader1);

      var myRequest1:URLRequest = new URLRequest("flash/products.swf");

      myLoader1.load(myRequest1);

      pContainer.x = stage.stageWidth/2 - 380;
      pContainer.y = stage.stageHeight/2 - 180;

       

      now, when I hit a button and I go back to frame 2 or any other frame in my movie, this movie clip is on  top of everything,
      I tried in frame 2:

      removeChild(pContainer);

      but it doesn't remove the movie clip any ideas?