NVM I FIXED IT !
Im making a cooking game and basically I have my buttons and background export to the stage, which is good, but now I want to make it so when you click on the mustard it exports the mustard movieclip to the stage.
For some reason I am getting an error that does not make any sence to me.
Error 1061: Call to a possibly undefined method addEventListener through a reference with static type Class.
Here is my code:
package
{
import flash.display.SimpleButton;
import flash.events.MouseEvent;
public class mustBttn extends SimpleButton
{
public function mustBttn()
{
x = 177 ;
y = 204.35 ;
mustBttn.addEventListener(MouseEvent.CLICK,gomust)
}
public function gomust (e:MouseEvent):void
{
trace("yay")
}
}
}