0

I'm getting an error where FlxGame can't be found. I am importing it and it's in the src folder. I copied the org folder from AdamAtomic-flixel-8989e50 into src. I'm writing this in FlashDevelop.

This is the error message:

C:\Users\***\Documents\Pong\src\Pong.as(8): col: 28 Error: The definition of base class FlxGame was not found.
 Loading configuration file C:\Users\***\AppData\Local\FlashDevelop\Apps\flexsdk\4.6.0\frameworks\flex-config.xml

And this is my AS3 class:

package 
{
    import org.flixel.*; 
    /**
     * ...
     * @author ***
     */
    public class Pong extends FlxGame
    {       
        public function Pong() 
        {
            super(320, 240, MenuState, 2);
        }       
    }
}
linnal86
  • 11
  • 4

1 Answers1

0

I think the easiest solution would be to use the same file structure used in most Flixel example projects. You should keep it in your org folder.

Otherwise, maybe try changing your import statement to:

import src.flixel.*

It looks like you are in the early stages of making your game. If this is your first time with Flixel, I highly recommend this tutorial.

Download the tutorial files and open it as a project in FlashDevelop (look for the file ending in .as3proj).

Or look for any other Flixel example projects. If you're like me, you'll find it easier to start from a demo game and edit the existing code/build on it. This way you don't have to worry about configuring folder paths, etc. and the game runs from the very beginning. Makes it a lot less frustrating :)

approxiblue
  • 6,982
  • 16
  • 51
  • 59
Ethan Fischer
  • 1,229
  • 2
  • 18
  • 30