2 Replies Latest reply on Feb 15, 2012 7:55 PM by subtlefly72

    loading an external movie clip

    subtlefly72 Level 1

      Hi team,

        Last time I wanted to load an external clip I could do it like this

      on (release) {

                unloadMovieNum(1);

       

       

                loadMovieNum("whatever.swf",1);

       

      }

       

      So now I want to achieve exactly the same thing in AS3,

      I have been looking at examples on the web but am getting all sorts of errors and basically don't know what I am doing.  I also want to know how to navigate to .swf files in a file structure, as I have to build an old school fscommand file structure for a cd-rom.

      Any and all help greatly appreciated.

      Cheers,

      Sub

        • 1. Re: loading an external movie clip
          subtlefly72 Level 1

          I keep getting a security error:(

          securityerror: error 200 no active security context

          • 2. Re: loading an external movie clip
            subtlefly72 Level 1

            Hey worked it out guys!

             

            var myLoader:Loader = new Loader();                     // create a new instance of the Loader class

            var url:URLRequest = new URLRequest("whatever.swf"); // in this case both SWFs are in the same folder

            myLoader.load(url);                                     // load the SWF file

            addChild(myLoader);                                     // add that instance to the display list, adding it to the Stage at 0,0

             

            But now I need to know.. How do I unload it?

            Cheers

            sub