У меня есть два класса: 'main' и 'TimerCountDown'. Я пытался вызвать одну функцию «reset» из «TimerCountDown» в классе «main».Методы вызова из другого класса Action Script 3
Это мой TimerCountDown класс:
public class TimerCountDown extends MovieClip
{
public function TimerCountDown(t:TextField, timeType:String, timeValue:Number, es:String, _documentclass):void
{
this.documentclass = _documentclass;
this.tfTimeDisplay = t;
if (timeType == "seconds")
{
this.timeInSeconds = timeValue;
}
if (timeType == "minutes")
{
this.timeInSeconds = timeValue * 60;
}
this.tfEndDisplayString = es;
this.startTimer();
}
public function reset():void{
clockCounter.reset();
}
}
Как создать ссылку в главном классе использовать функцию сброса функций основного класса? Я могу делать только такие, как
var myTimerObject:TimerCountDown = new TimerCountDown(timer, "seconds", 40, "0!", this);
, но понятия не имею о вызове функции сброса.