0 Replies Latest reply on Jul 25, 2007 9:21 AM by tdenault

    Interacting with Dynamic Movie Clips

    tdenault Level 1
      I have loaded a swf using AS3, using the

      import fl.containers.UILoader;
      import fl.controls.Label;
      import fl.controls.ProgressBar;

      so MC is called myUILoader, I want to navigate to another section of the FLA and I put an if statement on the function for the button:

      function mMenuNav1(event:MouseEvent):void {
      var nav:String = "home";
      mmBtnsOn();
      //if (currentLabel == "commercial") { this one works also to remove the child from the stage or the one below
      if (myUILoader) {
      myUILoader.stop();
      removeChild(myUILoader);
      }
      gotoAndPlay("home");
      nav1.enabled = false;
      }

      once I run the movie I get an error:
      Description:
      1061: Call to a possibly undefined method stop through a reference with static type fl.containers:UILoader.
      Source:
      myUILoader.stop();

      Can someone explain this to me? Why the sound doesnt stop after the child has been removed and why I can't stop the MC????