[quoted text, click to view] "SMB" <mailer@forums.com> wrote in message
news:efh935$b95$1@forums.macromedia.com...
>
> "Licarell" <webforumsuser@macromedia.com> wrote in message
> news:efh6oe$8ab$1@forums.macromedia.com...
>> Here is my situation. I have an flv with two event cue points. I have
>> placed a
>> FLVPlayback into my movie and called the instance "my_video".
>>
>> All I want to do is have my "begin" cue point tell my movie to
>> gotoAndStop at
>> frame 18 and then the second cue point "white flash" to tell the movie to
>> gotoAndPlay at frame 19.
>>
>> Thats it...I've poured over the help files and all over the forums and I
>> still
>> can't seem to get my head wraped around this.
>>
>> I'm usually pretty good at picking this stuff up but now I'm so
>> frustrated and
>> I can't think straight.
>>
>> Please help!!
>>
>
> I did something similar to this a long time ago. There is some method in
> the FLVPlayback component that returns the current playhead time.
>
> So, you could run some sort of looping function (onEnterFrame and
> setInterval come to mind) which checks the current playhead time. Then,
> it would check against your values for the "cue points" and jump ahead.
>
> Something like... (not tested)
>
> var cueData:Array = [ {cue_time: 12.0, frame_label: "frame 2"}, {cue_time:
> 24.0, frame_label: "frame 3"}];
> var cueIndex:Number = 0;
>
> var siID:Number = setInterval(checkPlayhead, 100);
>
> function checkPlayhead() {
> var myCueData:Object = cueData[cueIndex];
> var currentTime:Number = myFLVPlaybackComponent.playheadTime;
> if (currentTime >= myCueData.cue_time) {
> cueIndex ++;
> if (cueIndex >= cueData.length) {
> clearInterval(siId);
> }
> }
> }
>
Whoops... I guess this shows how long it has been for me. I don't remember
FLVPlayback having cuePoints as part of its class... but anyway. In the
help docs it shows them using a listener for the event of a cuePoint (this
makes a lot more sense) to have the FLVPlayback broadcast hitting a cuePoint
rather than having some other function checking.
So, from the docs it would be more like (again not tested)
** assumes your movie clip instance is named my_movie and your FLVPlayback
is my_video.
my_movie.my_video.addASCuePoint(12.0, "frame 2");
my_movie.my_video.addASCuePoint(24.0, "frame 3");
// Now you have cue points that the FLVPlayback knows about, and when it
gets to the cuePoint time it will fire off the cuePoint event... so
var listerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
use eventObject here...
}
my_movie.my_video.addEventListener("cuePoint", listenerObject);