I'm having some frustrating problems trying to get an FLV to play with the FLVPlaybackComponent.
It works if I set the contentPath in the parameters of Flash (CS3) and preview or use the generated HTML file.
However, when I put this into a page and access it through the webserver (even my local machine server) the file is rarely loading. I say rarely because it has randomly worked once within many many page reloads, even though I had changed nothing.
I have checked file permissions, and the SWF itself is loading. However, the video or play controls don't appear. I have also disabled my browser cache and set the Flash cache amount for my local server to none...
I'm using the following embed code to pass the URL of the video file to load, then using the Actionscript below to load the movie. Can anyone help with this?
Embed Code
Code:
<script type="text/javascript">
var so = new SWFObject("/flash/video.swf", "flashObj", "453", "319", "8", "#fff");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("quality", "best");
so.addParam("scale", "scale");
so.addVariable("videoUrl", "<?php echo $MainVideo; ?>");
so.write("mainVideoPlayer");
</script>
Actionscript
Code:
var videoUrl:String = _level0.videoUrl;
if (videoUrl != undefined)
{
import mx.video.*;
videoplayer.contentPath = videoUrl;
videoplayer.play();
}