Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Package Cannot Be Nested 1037 & Syntax Error 1084

New Here ,
Sep 20, 2013 Sep 20, 2013

Trying to learn how to crerate a Box2D game in WIndows 8 Flash Pro CC.   Opened new document in ActionScript 3.0 Class or ".as" as a Flash Pro application.  Very very new to all developer languages and processes.  Please help.

package {
    import flash.display.Sprite
    import Box2D.Dynamics.*;
    import Box2D.Collision.*;
    import Box2D.Collision.Shapes.*;
    import Box2D.Common.Math.*;
    public class Main extends Sprite{
        public function Main(){
            trace(*my awsome game starts here *);
        }
    }
}

TOPICS
ActionScript
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 20, 2013 Sep 20, 2013

if that's saved as Main.as in the fla's default directory., there's no problem with the code you showed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 20, 2013 Sep 20, 2013

the default directory is usually in the same directory where the main fla is saved but that can be changed in advanced actionscript settings panel (file>publish settings>actionscript settings - wrench icon).

p.s. you should copy and paste your actualy code.  if that is your actual code, that trace is incorrect and should contain a string.  ie, change the asterisks to quotes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 20, 2013 Sep 20, 2013

Sir,

How do I save that code as main.as in the flas default directory if it is already saved as "main.as". WHat do I do after I click on the wrench?

V/R,

Gregor Ivenz

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 21, 2013 Sep 21, 2013
LATEST

start by copying and pasting the code in Main.as and make sure that's Main.as, not main.as

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines