actionscript 3 - Flash CS5/AS3 - Can't find (or won't execute) the Main Document class - constructor not called -


All,

I am very new to AS3, so this is probably a very trivial question. But, I'm stuck.

I am working on a new Flash application (AS3).

  • "Application" folder
  • P> "com" folder < / Blockquote>

    • "[mycompany]" folder

        • "[myproject]" folder

          Then, in the Flash CS5, in the main FLA, the class: field "com.mycompany.myproject .AppName "indicates

          If I click on a slightly" pencil "icon next to that area, then Flash CS5 loads in AppName.as 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 fine as I expected so far, very good.

          However, when I try this on my home PC, it does not work - in AppName.as the constructor is never called.

          Output messages or errors - Just nothing happens Flash runs the SWF though there was no action script attached to it (no timeline code).

          So, obviously, my office is somewhat different on my home PC compared to PC

          • The folder structure is the same on both PCs (I use Dropbox
          • In Flash CS5, I click on any global source path (i.e., Edit & gt; Preferences> ActionScript> ActionScript 3.0 settings - all paths Fields are empty) are not set. It's the same on both PCs
          • I've set a document specific path on both PCs (i.e., in the Properties window, if I click on "Edit" next to Action Script settings, then " In the Advanced Action Script 3.0 "Source" tab, in the "Source Path" tab, only the entry is "." I think that it means that all source files in or below the Flash folder will be found in which / s FLF / Li>

            Strange thing ... on my home PC, when I'm in Flash CS5 - if I click on the small pencil icon next to the class, AppName.as loads in the IDE.So, It is as if Flash knows where the document is from.

            The only problem is that, when I test the film, the producer is not called.

            I know That there is no error in it class because it works perfectly on my office PC

            But, to make sure, I've reduced this class:

              package com.mycompany.myproject {import Flash.display.Sprite; Public class Extra AppName Sprite {Public Function AppName () {tr ace ("Working!"); }}}   

            When I do this test, on my office PC, I see "working" in the output window;

            [UPDATE]

            In response to several comments, here are screenshots: Thanks in advance for any information or advice! Different settings: Enter image details here

            here

            Removing ".as" from the end of the class name should correct your problem.

            The Flash IDE will replace the file with the name of the eligible class.

Comments