Hello all, I'm completely new to ActionScript (as well as brand new to this forum). I'm using FlashDevelop and Flixel to attempt to make games.

The error code I'm getting is: "Call to a possibly undefined method addEventListener through a reference with static type QuitButton."

I have an image, quit.png, that I want to use as a Quit button. When clicked on, I'd like the game to go back to the MenuState. I have the image embedded in QuitButton.as, and MenuState is MenuState.as. The actual button appears in PlayState.as. Here is QuitButton.as, as this is where the problem lies:

PHP Code:
import org.flashdevelop.utils.FlashConnect;
import flash.events.*;
import flash.display.*;
import org.flixel.*;
    public class 
QuitButton extends FlxSprite
Embed(source "../media/quit.png")]public var Quit:Class;
        private var 
        public function 
_parent parent;
        private function 
FlxG.state = new MenuState();
override function update():void


I have done some intense googling to try to find a solution, which I'd assume is obvious since I've only just started with flash and I'm not programming anything too difficult yet. If you can, try to explain in plain English for me Thanks in advance!