What could be the possible reasons for ArgumentError: Error #2109: Frame label off over not found in scene Scene 1.
at flash.display::MovieClip/gotoAndStop()This code appears after my timer has finished and is supposed to change scene (a timer event).
function timerLeft1(seconds:int):void
{
var t1:Timer = new Timer(50, seconds*thickness1);
// graphic element
var w1:Number = thickness1;
var h1:Number = stage.stageHeight-thickness1;
var g1:Sprite = new Sprite();
addChild(g1);
// find percent and draw it!
t1.addEventListener(TimerEvent.TIMER, onTimer1);
function onTimer1(evt:Event):void
{
var cc1:int = evt.target.currentCount;
var gHeight1:Number = (cc1 * h1)/(seconds * thickness1);
g1.graphics.beginFill(0xB0471C);
g1.graphics.drawRect(0, stage.stageHeight-thickness1, w1, -gHeight1);
}
t1.addEventListener(TimerEvent.TIMER_COMPLETE, onComplete1);
function onComplete1(evt:Event):void
{
gotoAndPlay("1, win");
}
t1.start();
}
aroundTimer1(timerDuration1);
stop();
I’ve basically drawn a timer on stage, followed by a listener changing the scene once the timer has expired.
I don’t see any errors in the code, but is there perhaps anything preventing it from changing the scene in the aforementioned code?