ForumsProgramming ForumAnother problem

28 24637
alex57834
offline
alex57834
88 posts
Nomad

I get the error

CountdownDisplayMain.as, Line 16 1119: Access of possibly undefined property CountdownClockDisplay through a reference with static type Class.
and also the same on line 27

package {

import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.utils.Timer;

public class CountdownDisplayMain extends MovieClip {

var time:Number;
var timeTimer:Timer;

public function CountdownDisplayMain()
{
time + 60;

CountdownDisplayMain.CountdownClockDisplay.text = time.toString();

timeTimer = new Timer(1000);
timeTimer.addEventListener(TimerEvent.TIMER,countdown);
timeTimer.start();

}

function countdown(Event:TimerEvent)
{
time -= 1;
CountdownDisplayMain.CountdownClockDisplay.text = time.toString();
}

}

}




In my document class i have the following

var countdownDisplayMain:CountdownDisplayMain = new CountdownDisplayMain();
countdownDisplayMain.x = 50;
countdownDisplayMain.y = 350;
addChild(countdownDisplayMain);

  • 28 Replies
Showing 31-30 of 28