External File Paths Question

Hello all,

I have a question regarding proper usage of paths in Flash 8. I usually set my projects up so they look something like this:

index.html
SWF
CSS
AS
TXT
IMAGES
FLA

According to the help docs, setting a path like this: “…/XML/file.xml” should work. usually it does, but I have been running into problems where files don’t seem to get found. They’ll be loaded fine in the index.html file, but in the FLA preview it won’t find it. I have publish set to publish to the correct subdirectories but still run into problems.

Would using a global path declaration in the start of th AS help? Any tips of best practices? Thanks!

you may omit the … and / as in:

"XML/file.xml"

No luck with that. I’m on OS X so don’t know if that makes a difference. I need the …/ becasue the swf file is located in the subdirctory SWF, so I need to go back one directory and then into the subdirectory.

Like I mentioned, it works fine when I preview it from within Flash, but not when I preview HTML in Flash. I’ve tried using a global:


_global.CSSPath = "../CSS/";
var format = new TextField.StyleSheet();
var path = CSSPath + "main_styles.css";

Again, previews fine but not in HTML. anyone have any idea what’s wrong here? Thanks!