我正在尝试通过 swfobject oject 通过 javascript 初始化一些 flash 变量:
var flashvars = {param: "one"};
var params = {};
var attributes = {};
attributes.id = "as3_js";
swfobject.embedSWF("test.swf", "alt", "450", "450", "9.0.0", false, flashvars, params, attributes);
我正在尝试使用 Flex 4,但 my_param 从未从 flashvars 中获取值,也从未发出警报:
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="initApp()">
public function initApp():void
{
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var icon_url:String;
icon_url = paramObj['param'];
my_param = icon_url;
Alert.show(my_param);
}