Aufruf einer Flash AS3-Funktion alle 20 Sekunden

Wie legen Sie eine Funktion zum Inkrementieren in AS3 Flash. Ich bin versucht zu starten, erhöht die Funktion, wenn Sie mein video startet und dann führen Sie die gleiche Funktion, die alle 20 Sekunden, bis das video Stoppt.

etwas wie:

    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.
     }
InformationsquelleAutor Denoteone | 2011-11-28
Schreibe einen Kommentar