dimanche 31 mai 2015

Timer flash to show something at the right time

I want to make a timer that will show text at my panelText (dynamic text box) at specific time, actually I have a video that I want to have subtitles, and I want to use timer, my video is 3 minutes and 37 second long, and I have script that I want to show at some time, example at 1 minute 0 seconds it will show the text "hello, this is my video to learn about solar system" in my panelText, and at 2 minute I want to show text "There are 8 planets in our solar system", something like that. For information, I'm using flvPlayback to play the video and load the external video.

An example from my code:

var myTimer:Timer = new Timer(217000);
var time = 0;

function timerHandle(event:TimerEvent){
    if(myTimer == 120000)
        panelText.text="There's 8 planets in our solar system";

and i got error 1176: Comparison between a value with static type flash.utils:Timer and a possibly unrelated type int. can someone help me?, i'm sorry for my bad english

Aucun commentaire:

Enregistrer un commentaire