Subclass, Overriding a function not marked for override
Hi guys,
I have a .fla and one .as (DisablingButtons.as). The .fla currently has only one key frame and three movie clips. First movie clip has base class flash.display.MovieClip and class DisablingButtons.as. The other two movie clips have base class DisablingButtons and their own classes (set by flash on export). The movie clips have identical timelines, 20 frames, two motion tweens, and the only action is stop(); on frames 1,5,10,15.
I get two errors:
5000: The class 'DisablingButtons' must subclass 'flash.display.MovieClip'
and 4 copies of
1024: Overriding a function that is not marked for override (on frames 1,5,10,15 of movie clip #2)
I am importing flash.display.MovieClip and have public class DisablingButtons extends MovieClip. Ideas?
Code below:
package
{
import flash.text.TextField;
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class DisablingButtons extends MovieClip
{
var labels:Array;
var thisParent:*;
var score:Number = 0;
var goalScore:Number = 8;
var score1:TextField;
public function DisablingButtons(txt:TextField)
{
trace("it's working!");
score1 = txt;
labels = this.currentLabels;
this.addEventListener(MouseEvent.CLICK, scoreGame);
this.addEventListener(MouseEvent.CLICK, disableButton);
this.addEventListener(MouseEvent.ROLL_OVER, over);
this.addEventListener(MouseEvent.ROLL_OUT, out);
}
function scoreGame(myEvent:MouseEvent):void{
score++;
score1.text = String(score);
if (score == goalScore) {
gotoAndStop(201);
}
}
function disableButton(event:MouseEvent):void
{
for (var i:int = 0; i < labels.length; i++)
{
if (labels.name == "disable")
{
this.gotoAndPlay("disable");
}
}
this.removeEventListener(MouseEvent.CLICK, disableButton);
this.removeEventListener(MouseEvent.ROLL_OVER, over);
this.removeEventListener(MouseEvent.ROLL_OUT, out);
}
function over(event:MouseEvent):void
{
for (var j:int = 0; j < labels.length; j++)
{
if (labels
{
this.gotoAndPlay("over");
}
}
}
function out(event:MouseEvent):void
{
for (var k:int = 0; k < labels.length; k++)
{
if (labels
{
this.gotoAndPlay("out");
}
}
}
}
}