All,
I'm pretty new to AS3, so this is probably a very trivial question. But, I'm stuck.
I'm working on a new Flash application (AS3). The app uses a Document class.
Here's how I've set up the folder structure:
"com" folder
"[mycompany]" folder
"[myproject]" folder
So, in Flash CS5, in the main FLA, the Class: field points to "com.mycompany.myproject.AppName"
If I click the little "pencil" icon next to that field, Flash CS5 loads AppName.as in the IDE.
In AppName.as, the first few lines are:
package com.mycompany.myproject {
import flash.display.Sprite;
public class AppName extends Sprite {
When I test the movie, everything works just like I'd expect. So far, so good.
However, when I try this on my HOME pc, it doesn't work - the constructor in AppName.as is never called.
There are no output messages or errors - just that nothing happens. Flash runs the SWF as though there was no ActionScript associated with it (there's no timeline code).
So, clearly, something is different on my home PC than on my office PC. But I can't figure out what.
Here's what I've ruled out:
The strange thing... on my home PC, when I'm in Flash CS5 - if I click the little Pencil icon next to the Class: field, AppName.as loads in the IDE. So, it's as though Flash knows where to find the document.
The only problem is that, when I test the movie, the constructor is not called.
I know there are no errors in that Class, since it works perfectly on my office PC.
But, just to be sure, I reduced the Class to this:
package com.mycompany.myproject {
import flash.display.Sprite;
public class AppName extends Sprite {
public function AppName () {
trace ("Working!");
}
}
}
On my office PC, I see "Working" in the output window when I test this; on my home PC, nothing.
Many thanks in advance for any insight or advice!
[UPDATE]
In response to several comments, here's screenshots of the various settings:
Here's the full size image
I know it's bad form to answer your own question, but I finally figured it out. It had to do with lettercase in the path.
Here's the details (just in case anyone else is interested)...
It turns out that on the computer I originally created the application on (my office PC), the path I used was:
So, my document class begins:
package com.mycompany.MyProject {
As I mentioned, I use dropbox.
So, when I started up my home PC, dropbox automatically starts, and syncs everything.
However, here's what dropbox created:
Note that "myproject" is not capitalized the same way.
Apparently, the Flash IDE is not sensitive to case, which is why it was able to find the Class document (MyProject.as), when I tried to edit it. However, the compiler must be, so it was not able to find it.
As soon as I changed the "myproject" folder to "MyProject", everything worked great.
Sorry for such a stupid question.