This content has been marked as final. Show 5 replies
im not sure if this will help but I am creating a game with custom classes which are .as files and all I did was put #include "CustomeClass.as" in the fla timeline
I am not looking at Lee's tutorial but from your description it sounds like it was not clear where you need to put your files.
The class you are trying to use #import on needs to reside in a folder named utils which is in a folder named leebrimelow which is inside a folder named com. Each word between the periods is a new folder. This to my understanding is a standard that was established somewhere along the way for organizational purposes.
If you want to have the class at a different level you would just change the import syntax accordingly.
If it is relative to your fla file you would just say [ import Scale.as ]
The ending asterisk ' * ' is telling flash to import all class files within the utils folder.
Let me know if that helps or not.
The fales were placed exactly as you describe. Result: Compile Error
Your method does not work for me. The error I got said that import could not be used as a directive (i.e., #iinclude) so then tried it with import "Scale.as" and still got the compile error. In that case the Scale.as file was placed in the same folder as the FLA file.
I haven't a clue as to how things got messed up but the solution was to reinstall Flash.
LOL! That would have been my next guess ;)