1

ビデオ内の特定のクリップが再生されている正確な時間にメソッドを実行する必要があります。

これまでのところ、私はこれを行うことができます:

<s:VideoDisplay id="vid" currentTimeChange="checkTime()" x="208" y="49"/>

それから私のスクリプトでは、私は持っています

        function checkTime():void{

                label.text = new String(vid.currentTime);
                if(Math.round(vid.currentTime) == 12){
                    fademe();
                }

上記は機能しますが、メソッドを実行するのに必要な正確な時間は約11.650秒です。Math.round()を取り出すと、動作しません。

助けてください、これはおそらく単純なことですが、私はFlexとactionscriptを初めて使用します。

ありがとう

4

1 に答える 1

1

現在の時間の大きさを変更します。

   function checkTime():void{

            label.text = new String(vid.currentTime);
            int currentTime = Math.round(vid.currentTime*100) ;
            if( currentTime >= 1165 && currentTime <= 1170 ){
                fademe();
            }
于 2013-01-13T03:07:08.450 に答える