views:

14

answers:

1

I want to use flv files for help document. But i need to set flv file, start and end points with code.

I'm trying to code flash player which can take these parameters(file name, start, end points) from html parameters.

NetConnection, NetStream and Video components are that i'm using. But i couldn't change the starting point to load flv.

Any help would be appreciated...

A: 

It sounds like you're going to want to use FlashVars to pass in your data - just create three flashVars, one for each, and pass them in.

Note that Flash Vars can only be Strings, so you'll have to convert your start and end points to Numbers before using them.

Once you have your .flv url string passed in via a flashvar, you can just use it as the source for your NetStream.

Myk
yes you are right. And i don't want to load all video to change its starting point. Forex: i want to load and play only from 5th second to 15th second.
uzay95
OK, so what you're going to use is NetStream's seek() method which takes a second value.var startTime:Number = 5;var endTime:Number = 15;myNetStream.seek(startTime);myNetStream.play();And then in your metadata handler you're going to be listening for the NetStream.time property to reach endTime.Does that make sense?
Myk
I wrote it but it loaded all video file before seek function work. Should i use flash media server to do this? dailymotion.com is doing this. When you drag progress bar it starts to download where you drag it.
uzay95
Ah, well yeah - if you're using Progressive Download you can't just download a segment of the video, you need to download up to the start point.However, and this is brand new, but Adobe has enabled HTTP:// streaming with Flash Player 10.1 meaning that you can do instant-seek with real streaming without having to use FMIS. Look up "Flash Player 10.1 HTTP Streaming", should find something.
Myk