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

Error 5008. Please Help????

Participant ,
Apr 10, 2013 Apr 10, 2013

I get this error when trying to import another class

C:\Users\Luke\Documents\Flash Files\NewStickFightingProject\as3\SceneSetup.as, Line 15008: The name of definition 'SetupScene' does not reflect the location of this file. Please change the definition's name inside this file, or rename the file. C:\Users\Luke\Documents\Flash Files\NewStickFightingProject\as3\SceneSetup.as

I have two classes. My Main.as class (Document Class) and My SetupScene.as class.

All I want to do is import My SetupScene Class with my Main.as but I cant get it working for the life off me

Main.as (Document Class)

package

{

          import flash.display.Sprite;

          public class Main extends Sprite

          {

                    private var SceneSet:SceneSetup;

                    public function Main()

                    {

                              SceneSet = addChild(new SceneSetup()) as SceneSetup;

                    }

          }

}

SetupScene.as

package

{

          import flash.display.Sprite;

          public class SetupScene extends Sprite

          {

                    var Frame1:menu = new menu();

                    var Frame2:Shop = new Shop();

                    public function SetupScene()

                    {

                              addChild(Frame1);

                    }

          }

}

Both classes are in the same folder with the .fla and I have defined the path in my publication settings

C:\Users\Luke\Documents\Flash Files\NewStickFightingProject\as3

Does anyone know what I am doing wrong because Ive been trying to solve this for more then 2 days 😕

TOPICS
ActionScript
721
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

correct answers 1 Correct answer

Community Expert , Apr 10, 2013 Apr 10, 2013

your class file is SceneSetup.as,  not SetupScene.as

change the file name.

Translate
Community Expert ,
Apr 10, 2013 Apr 10, 2013
LATEST

your class file is SceneSetup.as,  not SetupScene.as

change the file name.

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