Hi, I am not new to flash, its just that i had never had to use flash vars in an html…
i am trying to make a customised flv player which reads the source from flash vars from the html.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("myFlashContent", "10.0.0", "expressInstall.swf");
</script>
</head>
<body>
<div>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="myFlashContent">
<param name="movie" value="some.swf" />
<param name="menu" value="true" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="wmode" value="window" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value="source=http://www.mfk.smthakur.com/001_conv.flv" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="some.swf" width="100%" height="100%">
<param name="menu" value="true" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="wmode" value="window" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value="source=http://www.mfk.smthakur.com/001_conv.flv" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>
and the following is the actionscript
i have added an FLVPlayer component onto the stage named as flvPlayer_flv
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var tf:TextField = new TextField();
tf.autoSize = TextFieldAutoSize.LEFT;
tf.border = false;
addChild(tf);
tf.appendText("params" + "
");
try
{
var keyStr:String;
var valueStr:String;
for (keyStr in paramObj) {
valueStr = String(paramObj[keyStr]);
tf.appendText(" " +"key:"+ keyStr + " " + "value: "+ valueStr + "
");
}
} catch (error:Error) {
tf.appendText("error");
}
flvPlayer_flv.source = valueStr;
what am i doing wrong? please advice…
kind regards