This content has been marked as final. Show 1 reply
> I have a website that will be run on a computer (not on a web server, and it
> may be moved around onto other machines).
> There is a webpage in the root folder, which has a flash file embedded in it
> using the default dreamweaver cs3 embed script.
> The flash SWF file is located in a folder called Media.
> The flash swf access two files that are also in the Media folder: a css style
> sheet and an xml content file.
> When running the SWF locally, it locates the XML and CSS perfectly.
> When embedding it in the webpage, it becomes apparent that the path that it is
> using to find these files is now relative to the webpage itself and no longer
> to the SWF.
are you sure the path is to your files is Media/file.css and Media/file.xml ?
Keep in mind that once you run from within HTML that calls file from some folder,
the paths change.
> I do not really want to have to define the paths differently in teh SWF file
> (some files will be used in different places and will need to be demo'ed as
> they stand).
you have no choice, the paths must be consistent and can't be flexible.
> Is there a way of forcing either Flash or DW to use the paths in the SWF
> relative to the SWF rather than relative to teh webpage - a line of
> actionscript for example that will force the paths to be seen as relative from
> the swf.
the SWF always assumes location of its host HTML document. No matter how deep in
a folders and sub folders you going to place it, if the HTML is in the root of the
folder, this is where the SWF will look from for its files to load. Always from the
perspective of the host html file, not its original location. The paths then must be
"Never play Leap-Frog with a Unicorn."
If you want to mail me - DO NOT LAUGH AT MY ADDRESS