dynamic importing flv files
- Started
- Last post
- 6 Responses
- Moo
I'm after uploading video files to a database and then linking them to a swf file in order for them to play but we want the swf file to dynamically pull in the correct flv file can this be done and if so does anyone have any ideas how it works??
cheer m00
- maximillion_0
yes it can be done, check out the video class and netstream class in as2 or as3. you dont import the flv like you might do with the flash IDE (so you have the video as an object on the timeline) but stream the video as a video file
- monoboy0
How about using XML to load your .flv's into a flash player?
- Moo0
How would i go about telling the swf to import different flv files?? what I'm looking to have is one swf container and then upload the flv file up to the databae via the admin and when you select a video i want the swf to pull in the correct flv file and play hows this done???
- v3nt0
just get the filename from the loaded variables(however you doit) and use
btn.onRelease = function(){
path_to_FLVplayback.contenPath = "pathto/"+videofile;
}
don't bother with the netstream stuff, unnecessary complication.
- fugged0
yeah - for simplicity, just use the FLV playback component and set the contentPath to the URL of the video that you need played at that time.
- maximillion_0
netsream class allows you to handle the errors you may receive (loss of stream, buffer empty etc) - i dont think the playback component does this although I could be wrong