How do you set a function to increment in AS3 Flash. I am trying to start the incremented function when my video starts and then run the same function every 20 seconds until the video stops.
something like:
my_player.addEventListener(VideoEvent.COMPLETE, completePlay);
my_player.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, startPlay);
function startPlay(){
startInc();
//OTHER items are started and set within this function that do not have to do with the incremented function.
}
function completePlay(){
//This is where the startInc is stopped but not removed since it will be used again.
}
function startInc(){
//This function should run every 20 seconds.
}
User a timer around your player’s VideoEvents.