;

PDA

Click to See Complete Forum and Search --> : cue points, flv, interaction


rosebudinski
10-31-2007, 02:15 PM
Hello,

I have a streaming movie within a flash file and through the use of cue points I have the info in the flash movie (seemingly) reacting to the video. What I want to do is to be able to have the user scroll back and forth in the streaming movie to review the information presented. However, if the streaming movie timeline control is moved, everything then becomes out of synch. Obviously not what I want. If it's just played all is fine, but as I say I need to have the user interact by rewinding and fast forwarding the streaming movie while still maintaining the appropriate information that is running in the flash movie.

Hope that makes sense. Does anyone know how this could be done?


Thanks in advance,
T

caroach
10-31-2007, 06:41 PM
do you have any example code or FLA's that you could share to better illustrate the problem. I think I understand what you are trying to do, but it would be easier to see an example.

rosebudinski
11-06-2007, 07:10 PM
Help I'm falling off the cliff of the first few pages...

anyone have any idea on where to start?

Thanks,
T

DallasNYC
11-06-2007, 11:17 PM
There are a few events and properties of the flvPlayback class that will work. The SEEKED event dispatches when the playhead is changed by the user via the seek bar. When it is dispatched, you can find the closet cue point back in time using the 'findNearestCuePoint()' method. Then write your function to display the rest of your flash movie based on what is returned.

Here is an example tracing cuePoints and tracing the nearest cue points when a SEEKED event is dispatched.

//Where there is a flvPlayBack component named 'myVid' with several event cuepoints embeded. 'myVid' has a skin which includes a seek bar
myVid.addEventListener(MetadataEvent.CUE_POINT, cuePointListener);

function cuePointListener(event:MetadataEvent):void {
trace("//// cuePointListener ////");
trace("Elapsed time in seconds: " + myVid.playheadTime);
trace("Cue point name is: " + event.info.name);
trace("Cue point type is: " + event.info.type);
}

myVid.addEventListener(VideoEvent.SEEKED, lastCuePoint);
function lastCuePoint(event:Event):void {
var rtn_obj:Object = new Object();
rtn_obj = myVid.findNearestCuePoint(myVid.playheadTime);
trace(".... playhead seeked ....");
trace("Cue point name is: " + rtn_obj.name);
trace("Cue point time is: " + rtn_obj.time);
trace("Cue point type is: " + rtn_obj.type);
}
// The SEEKED event will dispatch when the user moves the seek bar. You could also use the PLAYHEAD_UPDATE which will dispatch much more often.
//myVid.addEventListener(VideoEvent.PLAYHEAD_UPDATE lastCuePoint);

At this point, I only know a bit about the flvPlayback component, if you are not using the component, i am sure that there are similar events,methods and properties in the class you are using.