Click to See Complete Forum and Search --> : Problems loading FLV files


paul_watkins
03-27-2007, 02:44 PM
Hi

I hope someone can help, this is driving me crazy.

I have a simple swf media player that loads an FLV file.
The swf file is embeded in the page using SWFObject, and the FLV file is sent to the swf file using
so.addVariable("file", "flvfilename.flv");

The name of the flv file is stored in a database, i have a number of video files to play.

It was working perfectly, but suddenly it stopped and has now become very tempremental. Sometimes it works and some times it doesn't.

I was thinking that the FLV file name is being cached and causing problems when a different file name is sent to the SWF file.

Does anyone have any ideas? Or knows of another way to achieve the same result?

Thanks for your help

Paul

_Aerospace_Eng_
03-28-2007, 01:40 AM
I've had some issues using addVariable with SWFObject so what I did was this
urltoflash.swf?file=flvfilename.flv
and in the actionscript I used the keyword 'this' to get the movie.
var somevar = this.file;
where somevar would be assigned the value of file in the swf url.

paul_watkins
03-28-2007, 04:18 AM
Hi

Thanks for your reply, i've tried that and it loads the File name with no problem, however, it is still temperamental. It will play a video once, but then not play a different video. If i clear the cache, it then plays the new video once. But if i refresh the page or try to load another video nothing happens.

I've read about appending a random number to loadVariables to stop the variables being cached. Is there something similar i can do here to the loaded FLVFilename?

Does anyone have any ideas?

Cheers

paul_watkins
03-28-2007, 05:16 AM
Hi, me again!!

If i call the SWF directly in the URL it plays all the videos perfectly.
ie www.domain.com/vid.swf?file=flvfilename

I can change the flvfilename and it plays all the videos with no problems.

When it's embeded in a page using the SWFObject it has problems. The FLV name is always passed the SWF, (i display the flv name for testing) but it doesn't want to load properly.

Could this be a problem with the SWFObject?

Thanks for your help