I have this legacy code which embeds an SWF into an HTML using an old version of SWFObject.js:
var so = new SWFObject("main.swf", "main", "100%", "615", "9.0.115", "#000000");
so.addVariable("deeplink", deeplink);
so.addVariable("cid", cid);
so.addParam("scaleMode", "noscale");
so.addParam("allowScriptAccess", "always");
so.addParam("allowFullScreen", "true");
so.write("flashcontent");
How should I rewrite it for the latest SWFObject.js? I have tried this but failed, and I would like to rule out the syntax-mismatch first:
var mainSwfProperties = {
flashVars : {
cid : cid,
deeplink : deeplink
},
params : {
allowFullScreen : "true",
allowScriptAccess : "true",
scaleMode : "noscale",
wmode : "window"
},
attributes : {}
};
swfobject.embedSWF("main.swf", "flashcontent", "100%", 615, "9.0.115", null,
mainSwfProperties.flashVars,
mainSwfProperties.params,
mainSwfProperties.attributes
);