This content has been marked as final. Show 3 replies
read about packages in "programming with as 3" in the help files. i think you have some misunderstandings. the following address your specific questions but i don't think it will clarify things for you.
you can place your package anywhere you want as long as it's in the class path. and, of course, you need to put your file in a folder with a matching package name - that's one of the main benefits of using packages and is used to prevent name conflicts.
Yes I am working my way through Programming in AS3 now....hence my questions :)
I tried to just place my package anywhere in the class path and kept getting an error on the package name. If it isn't in a folder, is the package name not defined - as in:
public class whatever
I'm just wondering if it is in the root of the classpath - i.e. not in a folder - how to get it to work because it kept giving me errors until I placed the package in a folder of the same name.
I don't see how I can put it anywhere I want in the classpath if it needs to be in a folder of the same name as the package. Doesn't that restrict me and go against putting it just anywhere?
Sorry to bother with these questions. I am reading As3 programming but it doesn't always make things perfectly clear.
Thanks so much!
if you don't name your package then that file must be in the class path. your class paths are defined in file/publish settings/flash/actionscript version 3/settings.
you can use the browse to path button to navigate to your class as file and put it in the class path.