Skip to main content
Inspiring
April 10, 2013
Answered

Error 5008. Please Help????

  • April 10, 2013
  • 1 reply
  • 747 views

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 😕😕

This topic has been closed for replies.
Correct answer kglad

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

change the file name.

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 10, 2013

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

change the file name.