Flash CS5 / AS3 - Unable to find (or not execute) main document class - constructor not called

All,

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

I am working on a new Flash application (AS3). The application uses the Document class.

This is how I created the folder structure:

  • "attachment"
  • "com"

    • "[mycompany]"

      •   
      •   

        "[myproject]"

          
          

So, in Flash CS5, in the main FLA, the Class: field points to "com.mycompany.myproject.AppName"

If I click on the small Pencil icon next to this field, Flash CS5 will load AppName.as into the IDE.

In AppName.as, the first few lines:

package com.mycompany.myproject {
    import flash.display.Sprite;
    public class AppName extends Sprite {

When I test the movie, everything works as I expected. So far so good.

, , - AppName.as .

- . Flash SWF, ActionScript ( ).

, , - , . , .

:

  • ( dropbox, , )
  • Flash CS5 (.. Edit > Preferences > ActionScript > ActionScript 3.0 Settings - ). .
  • (.. , "" ActionScript, " ActionScript 3.0". " ", tab, - ".". , , Flash , FLA/SWF .

... , Flash CS5 - Class: AppName.as IDE. , Flash , .

, .

, , .

, , :

package com.mycompany.myproject {
    import flash.display.Sprite;
    public class AppName extends Sprite {
        public function AppName () {
            trace ("Working!");
        }
    }
}

"" , ; , .

!

[]

: enter image description here

+3
4

, , , , , . .

( - )...

, ( ), , , :

  • ""
  • > "com"
  • > โ†’ "[mycompany]"
  • > โ†’ - > "[MyProject]"

, :

package com.mycompany.MyProject {

, dropbox.

, , Dropbox .

, Dropbox:

  • ""
  • > "com"
  • > โ†’ "[mycompany]"
  • > โ†’ - > "[myproject]"

, "myproject" .

-, Flash IDE , Class (MyProject.as), . , .

"myproject" "MyProject", .

.

0

".as" .

Flash IDE .

+1

: . " " "" . ?

+1

, , - .

, , , . ": String", FLA.

if (floors = '') {
    floors:String = '{"floors":[{...'
}

shouldn't-be-there ": String", Document .

if (floors = '') {
    floors = '{"floors":[{...'
}
0

All Articles