PDA

View Full Version : #include path problem [MX]



waffe
February 2nd, 2003, 06:28 PM
I am using a #include file with flash and all is working except when I give a path to the include file like

../includes/db_constants.as

Flash does not see the file. If I just use db_constants.as as the path or render the flash file locally from my desktop flash sees the file.

So, question, is there a path issue when using the #include command? Does the includes file have to be in the same directory?

pom
February 2nd, 2003, 07:28 PM
#include "./voiture/variable.as"works for me, and so does
#include "voiture/variable.as"pom :)

waffe
February 2nd, 2003, 07:35 PM
Maybe it has something to do with the ".." as you know this takes you back one directory from where you are at.

This works in flash right?

pom
February 2nd, 2003, 07:39 PM
#include "../variable.as"works perfectly too :moustache

waffe
February 2nd, 2003, 07:58 PM
Strange, I went ahead and tried it again and it's working. Would not work a couple of days ago, but who cares, IT WORKS.

Thanks pom
;)

senocular
February 2nd, 2003, 08:47 PM
a common problem with using #include is that sometimes people, by habit, include a semicolon (;) at the end of a #include statement. Doing so will generate an error. So thats one thing to keep an eye out for in the future (though the error usually tips you off easily enough)