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:
package  
{
    
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 
_parent:*;
        
        public function 
QuitButton(_x:int,_y:intparent:*):void
        
{
            
super(_x_y);    
            
_parent parent;
            
loadGraphic(Quitfalsefalse178);
            
this.addEventListener(MouseEvent.CLICKclickquit);
        }
        
        private function 
clickquit(event:MouseEvent):void
        
{
            
FlxG.state = new MenuState();
        }
        
        public 
override function update():void
        
{
            
super.update();
        }

        
    }


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!