12 Replies Latest reply on Feb 11, 2008 1:29 PM by sage_morales

    Inserting or Importing

    sage_morales
      Hi Folks,

      Can anybody tell me if I can insert an SWF flash file into another Flash file. Using Flash ver 8

      Thanks Sage
        • 1. Re: Inserting or Importing
          clbeech Level 3
          yes, you can load an external swf file into a movieclip that is on the stage using either loadMovie() (not as good) or the MovieClipLoader class (much, much better)
          • 2. Inserting or Importing
            clbeech Level 3
            np-sage, here's a basic example:

            (PS: the swf file should be within the same directory as the 'loading' swf, but you can 'point' to a different path if being stored elsewhere)


            • 3. Re: Inserting or Importing
              sage_morales Level 1
              clbeech,

              I created the second movieclip with another flash creator called MagicFlare; will it still work?
              and Im not sure where to insert script, never have done it?
              The script is in Current Selection Layer 18: Frame 1 Scene 1 Layer 18 : Frame 1

              sage
              • 4. Re: Inserting or Importing
                clbeech Level 3
                yeah the mcl should load the other swf file ('frame2.swf') as long as the file is within the same directory, and it's an swf file (although you can load image files with it as well)

                is this not working?
                • 5. Re: Inserting or Importing
                  sage_morales Level 1
                  nope, also the frame2.swf in the library
                  • 6. Re: Inserting or Importing
                    clbeech Level 3
                    the file that you are trying to attach should not be in the library, it would be an external swf file, in the same 'folder' as the swf your making to load it.

                    IF you do have something in the LIBRARY that you are trying to 'load', it would be a 'movieclip' and not an external swf file. then you would do this entirely differently, using attachMovie();

                    is this the case, is the what you have called a 'swf' really a movieclip symbol in the Library?
                    • 7. Re: Inserting or Importing
                      sage_morales Level 1
                      clbeech,

                      I tried both ways, with and without frame2,swf in the library and it is not working
                      the file is in the same directory. Where do I install the script, I bielieve its alleady in, I can see it in the actions bar and it is in the layer and frame pointing. Where does it load in a 160w x 600h canvas.


                      Sage
                      • 8. Re: Inserting or Importing
                        clbeech Level 3
                        without specifying any coordinate parameters, it will load at 0,0.

                        :) ok let's get this straight now lol!! you cannot have a 'SWF' file in the Library, Flash will not let you import it, so you're getting your terms confused a little here. a SWF file is a published FLA file.

                        the name of the swf file you're loading is: 'frame2.swf' right? I mean that's how it's been saved right? same 'case' and everything exactly the same.
                        • 9. Re: Inserting or Importing
                          sage_morales Level 1
                          clbeech,


                          Yes the spelling and the case is the same, and the library thing I got rid of. I imported to the library when I mentioned it. Anyway, The script u gave me is in the actions - frame section above properties under Actions Script 1.0 & 2.0

                          Sage
                          • 10. Re: Inserting or Importing
                            clbeech Level 3
                            ok sage - I've made an example of this for you to look at and compare to what you have. this will download a 'folder' that contains what it needs, the FLA, and two SWF files. launch the 'swfLoader.fla' from within the folder, don't remove it. then in Flash run 'test Movie' and you'll see it load the 'simpleHero.swf' file into the 'loader' file.

                            here is the file DL: FILE
                            • 11. Re: Inserting or Importing
                              sage_morales Level 1
                              Okay CLBeech,

                              I have downlaoded and extracted and it works fine, I ran and it loads correctly.
                              I also loaded both swf files separetely to see difference. I looked at the fla file with Flash 8 and
                              you have two layes i hid both and could see any change on the cancas; although the script is in the second layer
                              which looks similar to mine, except when I ran the wizard yours was clean as a whistle and mine has a bunch of higlighted yellow on some script code.

                              should I send file. here is the link: http://www.loganglass.com/clbeech/rv_banner_01.zip
                              • 12. Re: Inserting or Importing
                                sage_morales Level 1
                                Sorry I noticed a mistake on the case, "F" on the file name for frame2.swf
                                I ran and loaded and but did no show Frame2.swf, is it in the correct order on the layers palette?

                                Sage