I would like to assign an event listener to a protected timer variable in the parent class.
I am working with Adobe LCCS, and created a BatonProperty which implements Baton
Now, Baton has a protected timer variable declared like this, and for some reason, I am unable to get access to this _autoPutDownTimer, from a BatonProperty instance.
public function Baton()
{
super();
_autoPutDownTimer = new Timer(_timeout*1000, 1);
_autoPutDownTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete);
invalidator.addEventListener(Invalidator.INVALIDATION_COMPLETE,commitP roperties);
}
I would love to attach an eventlistener to it like this, but it seems I cannot, any tips are truly appreciated:
public var mybatonprop:BatonProperty;
mybatonprop= new BatonProperty();
mybatonprop.sharedID = "myBaton";
mybatonprop.subscribe();
mybatonprop.baton._autoPutDownTimer.addEventListener(TimerEvent.TIMER,countDown);
This gives the error : "actionscript attempted access of inaccessible property through a reference with static type" But it seems that property is not private, only protected, since it is declared like this
/**
* @private
*/
protected var _autoPutDownTimer:Timer;