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:
- "application" folder
"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 folder structure is the same on both PCs (I use dropbox, so I know they're identical)
- In Flash CS5, I haven't set any global Source paths (i.e., Edit > Preferences > ActionScript > ActionScript 3.0 Settings - all path fields are blank). This is the same on both PCs
- I have set the document specific paths on both PCs (i.e., in the Properties Window, if I click "Edit" next to ActionScript Settings, I get the "Advanced ActionScript 3.0 Settings" dialog window. In the "Source Path" tab, the only entry is ".". I assume that this means that Flash will find all source files in or below the folder that contains the FLA/SWF.
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