I'm trying to understand how dispatchEvent class works with static const variable based on code below.
Let's say that dispatched events as shown below.
(videoTime has value of current video's time, videoDuration has total duration of video)
I've learned that constructor function of TestDispatch class executed for both event dispatching as long as the public contants declaired.
My question is what is the meaing of value of static constant "video_time", "video_duration"?
Looks like it has nothing to do with value of static constant whether it's "1", "hello" and ....
If it has something to do with dispathing event, in what case is it?
Please some one give me clear answer.
I'm still very new to actionscript and it's very confuses me.
public class TestDispatch extends Event
public static const TIME:String = "video_time";
public static const DURATION:String = "video_duration";
protected var _time:Number;
protected var _duration:Number;
public function TestDispatch(type:String, time:Number, duration:Number)
_time = time;
_duration = duration;