PDA

View Full Version : FlashVars in FLVPlayback with CS3


davidb2002
11-28-2008, 12:15 PM
I am trying to play a video I have selected dynamically via html and inserting use FlashVars into my FLVPlayback. I have scoured the net and have tried countless methods on doing this in CS3 and non of them seem to actually work. All I ever get is a flashing FLV icon. I have checked that the FLV is in the same directory and it is.

I have na FLVPlayback compnonet with the instance name of ''flv_player"
I have the following line placed on the first scene of my swf:
flv_player.contentPath = this.root.loaderInfo.parameters.flvfile
And this is the code that Flash CS3 has provided which I included FlashVar information in:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>videoplayer</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '640',
'height', '535',
'src', 'videoplayer',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'videoplayer',
'bgcolor', '#ffffff',
'name', 'videoplayer',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'videoplayer',
'salign', '',
'FlashVars','flvfile=lastleaves.flv'
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"

width="640" height="535" id="videoplayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="FlashVars" value="flvfile=lastleaves.flv" />
<param name="movie" value="videoplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="videoplayer.swf"

quality="high" bgcolor="#ffffff" width="640" height="535" name="videoplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"

type="application/x-shockwave-flash" FashVars="flvfile=lastleaves.flv" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>


Why can't I get the FLV to load? I have tried an AS2 version and it works without a problem, but need some features with the FLVComponent for AS3.

sugata_bhar
05-09-2009, 05:18 PM
http://sugataforum.hyperphp.com/forum/showthread.php?p=173#post173

Please click the ads profusely as a good gesture/donate using the DONATE thru paypal link at the center top of my homepage

Please remember to use x2.swf (feel free to use)

Please use for your variable "flvfile" my var "video_path".

Demo:

http://sugataforum.hyperphp.com/flv_player/

(please have patience as the flv will take time to load). I am tring to get a preloader

Thanks
Sugata