Перехожу с swfObject 1.5 на swfObject 2.2
возникли некоторые непонятки!Не могу передать flashVars
HTML
Цитата:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
</head>
<body>
<div id="fb-root"></div>
<div id="flashContent">
<h1>You need at least Flash Player 9.0 to view this page.</h1>
<p><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></p>
</div>
<script type="text/javascript">
//Dynamic publishing with swfObject
var flashVars = {xmlPath:"config.xml"};
//A 'name' attribute with the same value as the 'id' is REQUIRED for Chrome/Mozilla browsers
swfobject.embedSWF("main.swf?<? echo(time()) ?>", "flashContent", "980", "205", "9.0", flashVars, null, null, {name:"flashContent"});
</script>
</body>
</html>
|
AS3

Код AS3:
swfObjectVars = LoaderInfo(this.loaderInfo).parameters;
if(swfObjectVars["xmlPath"])
{
xmlPath = loaderInfo.parameters.xmlPath + "?rnd="+Math.random();
}
if(swfObjectVars["cssPath"])
{
cssPath = swfObjectVars["cssPath"] + "?rnd="+Math.random();
}
vars_txt.text = "xmlPath " + xmlPath + " cssPath " + cssPath;
что делаю не так?
Добавлено через 14 минут
блин, перепутал flashVars и params
Добавлено через 15 минут
кстати, а в чём разница между ними? Я так и не понял, вроде одно и тоже делают!