3 Replies Latest reply on May 9, 2009 5:20 PM by Ned Murphy

    importing a external .swf

    nogreydes Level 1

      Can anyone tell me how i import a .swf into an already existing .swf and still retain it as a .swf and not have it convert to a Movie Clip. I want it to load at the time not in the initial load when people are on the first 'page' or scene. I am constructing the webpage in Flash.


      Right now when I import the .swf to the library it automatically changed to a Movie Clip and when it is played it is loosing the pre-loader I have put on because its reading it as a movie clip now and not as the .swf.


      I would really appreciate some basic help as I am not an expert with code.


      Thank you

        • 1. Re: importing a external .swf
          kglad Adobe Community Professional & MVP

          you can load an external swf and you can import an external swf.  but importing it will lose all the functionality and whatever code is in the swf.

          1 person found this helpful
          • 2. Re: importing a external .swf
            nogreydes Level 1

            i found this quite helpful if anyone needs it as well. It worked for me. This is from a Flash tutor.....


            So the steps would be as follows:


            Create your main interface file (your main app/site)
            Create a new .fla which is the content you wish to load. Let's say it's
            called "my_content.fla".
            Publish the new content fla and make sure it's in the same directory as your
            main file. Working with the name from above, you should now have a
            "my_content.swf" file in the same directory as your main file.


            Back in your main file, create a new EMPTY movieclip (Insert-> New symbol).
            In the timeline (of your main file), when you get to the place you want to
            load in the new content swf, Place an instance of your new empty movieclip.


            Give it an instance name ie. "contentHolder_mc".


            Add a new keyframe to your code layer at that same point in the timeline.


            Add code similar to the following:


            contentHolder_mc.loadMovie( "my_content.swf" );


            Make sure you place an blank keyframe on your contentHolder_mc's layer when

            the insatance should no longer exist

            • 3. Re: importing a external .swf
              Ned Murphy Adobe Community Professional & MVP

              You can also use the MovieClipLoader.loadClip method to load external files.  The loadClip method is a much more versatile method because it supports the use of listeners.  And instead of creating an empty movieclip in the library, you can create one dynamically using the MovieClip.createEmptyMovieClip() method