PDA

View Full Version : include 'samp.as' ignores Include folder?



efos
January 8th, 2009, 08:59 PM
It seems that "include" only looks in the host FLA files folder. Back in 8, I recall placing files in your (and I paraphrase:) "%profile%\local\appdata\flash\en\config\Include" folder allowed centralized access to as files. I really need this, I can't have a few dozen copies of this file floating around the project structure when I need to make a change.

I see that an Include folder still exists, but I can't include anything that's in it, even the files that live there by default. Adobe help for CS3 indicates that this folder's function remains unchanged, but I just can't seem to make it go. Am I missing something here? This is a fresh load of Windows XP and CS4.

I know I can write a class that handles what I'm doing and just make it the document class; but I'd rather not. Any thoughts?

(I am also concerned that I'll just run into the same problem with the Class folder refusing to play ball...)

creatify
January 8th, 2009, 09:06 PM
pathing should still work, did you try forward slashes? the attached works fine on a mac.

efos
January 9th, 2009, 12:40 PM
That method works fine here. So I could just "../../" a few times and path out to a central script location; but that's a little dirty, and depth specific. The old method of storing everything in the Include folder was so tidy.
include "scripts.as" and Flash would check the local folder, then the Include folder; I can't fathom why it no longer works. I tried putting it in the class folder, lib folder, all the definable folders in the AS3 properties window. None of it seems to be working, which is why I'm hoping I'm missing something quite simple and fixable.

theCodeBot
January 9th, 2009, 02:25 PM
Works fine for imports...
You just have to set the path. Can't remember how to do it in flash, been a while, but in flex it's a matter of setting a project's source path

efos
January 9th, 2009, 02:37 PM
That it does, I've just avoided the issue by making a document level class with the code I would have included. So any insight on my initial problem will be academic, but I'd still like to know if anyone knows.