Skip to main content
Participating Frequently
November 21, 2013
解決済み

How to find a cuepoint in a f4v video (it worked with a flv video) ?

  • November 21, 2013
  • 返信数 2.
  • 1863 ビュー

I used the following AS3.0 code in my project, linking a video (.flv) and images :

When I click on the text Titre0 I want the video go to the cuepoint "1".

Titre0.addEventListener(MouseEvent.CLICK, fl_ClickToSeekToCuePoint_0);

function fl_ClickToSeekToCuePoint_0(event:MouseEvent):void

{

    var cuePointInstance:Object = my_FLVPlybk.findCuePoint("1");

    my_FLVPlybk.seek(cuePointInstance.time);

    this.gotoAndStop(1);

    diapo.value = 1;

}

It works with a flv video, not with a f4v.

このトピックへの返信は締め切られました。
解決に役立った回答 kglad

OK :

new test

0 [object Object]

1 [object Object]

2 [object Object]

3 [object Object]

4 [object Object]

5 [object Object]

6 [object Object]

7 [object Object]

8 [object Object]

9 [object Object]

10 [object Object]

11 [object Object]

12 [object Object]

13 [object Object]

14 [object Object]

15 [object Object]

16 [object Object]

17 [object Object]

18 [object Object]

19 [object Object]

20 [object Object]


you can use:

var cuepointA:Array = [];

my_FLVPlybk.addEventListener(fl.video.MetadataEvent.CUE_POINT,cueF);

btn.addEventListener(MouseEvent.CLICK,fl_ClickToSeekToCuePoint_0);

function fl_ClickToSeekToCuePoint_0(event: MouseEvent): void {

my_FLVPlybk.seek(cuepointA[0]);

}

function cueF(e:fl.video.MetadataEvent):void{

cuepointA.push(e.info.time);

}

返信数 2

kugua123作成者
Participating Frequently
November 21, 2013

Hello, thanks for your track, I thought it was that, but I don't know the syntaxt...

kglad
Community Expert
Community Expert
November 21, 2013

Titre0.addEventListener(fl.video.MetadataEvent.METADATA_RECEIVED,f);

function f(e:MetadataEvent):void{

    for(var s:String in e.info){

        trace(s+": "+e.info);

    }

}

kglad
Community Expert
kgladCommunity Expert解決!
Community Expert
November 25, 2013

OK :

new test

0 [object Object]

1 [object Object]

2 [object Object]

3 [object Object]

4 [object Object]

5 [object Object]

6 [object Object]

7 [object Object]

8 [object Object]

9 [object Object]

10 [object Object]

11 [object Object]

12 [object Object]

13 [object Object]

14 [object Object]

15 [object Object]

16 [object Object]

17 [object Object]

18 [object Object]

19 [object Object]

20 [object Object]


you can use:

var cuepointA:Array = [];

my_FLVPlybk.addEventListener(fl.video.MetadataEvent.CUE_POINT,cueF);

btn.addEventListener(MouseEvent.CLICK,fl_ClickToSeekToCuePoint_0);

function fl_ClickToSeekToCuePoint_0(event: MouseEvent): void {

my_FLVPlybk.seek(cuepointA[0]);

}

function cueF(e:fl.video.MetadataEvent):void{

cuepointA.push(e.info.time);

}

kglad
Community Expert
Community Expert
November 21, 2013

use the metadata function to see what cuepoints (if any) are in your f4v.