views:

18

answers:

2

i have built a custom class, which i call from a frame script. the custom class takes only one parameter, which is a string URL of an XML file.

SUDDENLY, when i move all the files off of my desktop into a different folder, i receive compiler errors, stating it can not find my custom class .as file, even though it's in the same folder!

why is this happening?

here's my entire frame script:

[SWF(width="1000", height="600", frameRate="60", backgroundColor="#330000")]

var sp:XMLClass = new XMLClass("XMLFile.xml");
addChild(sp);

errors:

1046: Type was not found or was not a compile-time constant: XMLClass.
1180: Call to a possibly undefined method XMLClass.

i call all of my custom classes like this and this is the first and only time i've ever had a problem like this.

by the way, if i move my files back to the desktop, it will compile fine. this is crazy! what is going wrong?!

+1  A: 

The compiler probably tries to find the classes in predefined folders, if the folder you are moving the files to isn't in included in that list, the compiler won't find the files, ergo it won't find the class definition.

Femaref
sorry? who is predefining these folders? how can they be altered? i've been writing classes for months, and moving them all to different folders when they are done. this is the first time this is happening.
TheDarkInI1978
in the project settings maybe. I'm not into actionscripr or flash, I just had the idea because it is similar in other languages.
Femaref
the .as class file is in the same folder as the .fla file that's calling it. it should find it immediately, as it has with all my other projects.
TheDarkInI1978
A: 

wow. the problem occurred because the folder i had moved all my .fla and .as files into had a forward slash in its name. ie: "21. XML / E4X". really, Adobe?

TheDarkInI1978