3 Replies Latest reply on Jun 4, 2007 8:53 PM by kglad

    issues with HTML following my folder hierarchy

    teeravuss Level 1
      Hi, I'm using flash 8 to update a site originally made in flash 6. I have my index.html pointing to an intro.swf inside the folder, "3D." So the index.html is pointing to "3D/intro.swf" That loads fine. But when I click the enter button (which uses the loadMovie to load the main swf into a target movie clip inside of intro.swf) the intro.swf disappears but the main.swf does not load. When I open the intro.swf wih flashplayer 8, I have no problems loading everything else. It's just when I try to execute it through the html that I keep running into this roadblock. It has to be something to do with the differences in 6 and 8, but I can't figure out what. I've tried switching the "allowscriptaccess" to "always" in the index.html, but am still having the same issue.

      I tried an alternate route--putting the intro.swf in the same location as the index.html. The intro.swf opens fine... and when I click enter, part of the main.swf loads, but not all of it... plus, links from main.swf no longer work (I get an error msg in flash pro saying that the location "...html_public/artwork.swf" does not exist, even though the main.swf points to "3D/artwork.swf"

      I even tried what would seem to be the simplest solution--pointing the index.html to main.html inside the 3D folder (using getURL and loading into the same window with the flash button). But again, I get an error msg saying that the location doesn't exist.

      What am I doing wrong??
        • 1. Re: issues with HTML following my folder hierarchy
          kglad Adobe Community Professional & MVP
          the paths used in your swf are incorrect. they should be relative to the html file in which the swf is embedded not relative to the location of the swf file.
          • 2. issues with HTML following my folder hierarchy
            teeravuss Level 1
            Thanks for the response.... I'm sorry, I'm not entirely sure how to make the swf relative to the html file.... are you saying ALL swf's that load should be relative to the html file? That would require quite a bit of changes...

            Ideally, I would want the html to open the first swf and then be able to load all other swf's into that swf. How I had it set up before in version 6 (which worked) was... the index has embed src="3D/intro.swf". In the intro.swf, I have the following action script on the timeline: loadMovie("main.swf", targetintro);

            So you're saying if I make the actionscript relative to the html, then the rest of the swf's that load will work? Or I have to change the actionscript in all the swf's? How do I make the actionscript relative to the html?

            Again, thanks for your help :)
            • 3. Re: issues with HTML following my folder hierarchy
              kglad Adobe Community Professional & MVP
              yes, your intro.swf is loaded into the same folder that contains the html file.

              so when intro.swf loads something (say target.swf) that's in the same folder as intro.swf (3D), the code in intro.swf will need to target 3D/target.swf.