title: Flash CS5/AS3 - Can't find (or won't execute) the Main Document class - constructor not called
body: <p>All,</p>
  
  <p>I'm pretty new to AS3, so this is probably a very trivial question. But, I'm stuck.</p>
  
  <p>I'm working on a new Flash application (AS3). The app uses a Document class.</p>
  
  <p>Here's how I've set up the folder structure:</p>
  
  <ul>
  <li>"application" folder</li>
  <li><blockquote>
    <p>"com" folder</p>
  </blockquote></li>
  <li><blockquote>
    <ul>
    <li><blockquote>
      <p>"[mycompany]" folder</p>
    </blockquote></li>
    </ul>
  </blockquote></li>
  <li><blockquote>
    <ul>
    <li><blockquote>
      <ul>
      <li><blockquote>
        <p>"[myproject]" folder</p>
      </blockquote></li>
      </ul>
    </blockquote></li>
    </ul>
  </blockquote></li>
  </ul>
  
  <p>So, in Flash CS5, in the main FLA, the Class: field points to "com.mycompany.myproject.AppName"</p>
  
  <p>If I click the little "pencil" icon next to that field, Flash CS5 loads AppName.as in the IDE.</p>
  
  <p>In AppName.as, the first few lines are:</p>
  
  <pre><code>package com.mycompany.myproject {
      import flash.display.Sprite;
      public class AppName extends Sprite {
  </code></pre>
  
  <p>When I test the movie, everything works just like I'd expect. So far, so good.</p>
  
  <p>However, when I try this on my HOME pc, it doesn't work - the constructor in AppName.as is never called.</p>
  
  <p>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).</p>
  
  <p>So, clearly, something is different on my home PC than on my office PC. But I can't figure out what.</p>
  
  <p>Here's what I've ruled out:</p>
  
  <ul>
  <li>The folder structure is the same on both PCs (I use dropbox, so I know they're identical)</li>
  <li>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</li>
  <li>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.</li>
  </ul>
  
  <p>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.</p>
  
  <p>The only problem is that, when I test the movie, the constructor is not called.</p>
  
  <p>I know there are no errors in that Class, since it works perfectly on my office PC.</p>
  
  <p>But, just to be sure, I reduced the Class to this:</p>
  
  <pre><code>package com.mycompany.myproject {
      import flash.display.Sprite;
      public class AppName extends Sprite {
          public function AppName () {
              trace ("Working!");
          }
      }
  }
  </code></pre>
  
  <p>On my office PC, I see "Working" in the output window when I test this; on my home PC, nothing.</p>
  
  <p>Many thanks in advance for any insight or advice!</p>
  
  <p>[UPDATE]</p>
  
  <p>In response to several comments, here's screenshots of the various settings:
  <img src="https://i.stack.imgur.com/ipBww.jpg" alt="enter image description here"></p>
  
  <p>Here's the <a href="http://resultsimperative.net/FlashSettings2.jpg" rel="nofollow noreferrer">full size image</a></p>