1 Reply Latest reply on Aug 16, 2008 1:05 AM by Newsgroup_User

    Loading external .swf to .swf

    bartosz1000
      Hi
      I have my main swf file call web.swf in this same folder I have folder call (galery1) inside (gallery1) I have my gallery.swf and gallery_data.xml and some .jpg. I will like to load gallery1.swf to my web.swf. I try to do this and it is working only when I import xml file out side folder (gallery1) .it is possible to load gallery.swf and gallery_data.xml file from folder (gallery1) to my web.swf. This is what I try see below.


      //load Movie Behavior
      if(this.gallery_loader == Number(this.gallery_loader)){
      loadMovieNum("/gallery1/gallery.swf",this.gallery_loader);
      } else {
      this.gallery_loader.loadMovie("/gallery1/gallery.swf");
      }
      //End Behavior

      thanks for help.
        • 1. Re: Loading external .swf to .swf
          Level 7
          bartosz1000 wrote:
          > Hi
          > I have my main swf file call web.swf in this same folder I have folder
          > call (galery1) inside (gallery1) I have my gallery.swf and gallery_data.xml and
          > some .jpg. I will like to load gallery1.swf to my web.swf. I try to do this
          > and it is working only when I import xml file out side folder (gallery1) .it is
          > possible to load gallery.swf and gallery_data.xml file from folder (gallery1)
          > to my web.swf. This is what I try see below.
          >
          >
          > //load Movie Behavior
          > if(this.gallery_loader == Number(this.gallery_loader)){
          > loadMovieNum("/gallery1/gallery.swf",this.gallery_loader);
          > } else {
          > this.gallery_loader.loadMovie("/gallery1/gallery.swf");
          > }
          > //End Behavior
          >
          > thanks for help.

          Of course it's possible. Flash totally does not care where the data comes from
          as long as all the paths are correct. If you load the XML from folder gallery1
          you will need to use something like:

          siteXML.load("gallery1/gallery_data.xml");

          Because the file is loaded from galery1 into web.swf, which is outside of the galery1
          folder, it will look for the files from the location of the host SWF file. So your paths
          to the JPG images in xml file must be galery1/fileName.jpg - follow directory structure
          as if you were calling it directly from web.swf



          --
          Best Regards

          Urami


          --
          "Never play Leap-Frog with a Unicorn."


          <urami>
          If you want to mail me - DO NOT LAUGH AT MY ADDRESS
          </urami>