var swfproxy=document.createElement("object");
document.body.appendChild(swfproxy);
var movie=document.createElement("param");
swfproxy.appendChild(movie);
var allowaccess=document.createElement("param");
swfproxy.appendChild(allowaccess);
var swfproxyemb=document.createElement("embed");
swfproxy.appendChild(swfproxyemb);
swfproxy.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
swfproxy.type = 'application/x-shockwave-flash';
swfproxyemb.width=swfproxy.width = 11;
swfproxyemb.height=swfproxy.height = 11;
swfproxy.id="SWFProxy";
//swfproxy.style.width="11px";
//swfproxy.style.height="11px";
swfproxy.codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab";
movie.name="movie";
swfproxyemb.src=swfproxy.data=movie.value="http://swfproxy.googlecode.com/files/flashproxy.swf";
allowaccess.name="allowScriptAccess";
swfproxyemb.allowScriptAccess=swfproxy.allowScriptAccess=allowaccess.value="always";
swfproxy.setVar("Preved","qwerty");
alert(swfproxy.getVar("Preved"));
import flash.external.ExternalInterface;
//import flash.filesystem.File;
//import XMLGetter;
import flash.net.SharedObject;
import flash.system.Security;
import flash.system.SecurityPanel;
//Security.showSettings();
//Security.allowDomain("*");
var so:SharedObject;
function makeSO(namespace:String="JSFlashStorage"){
so= SharedObject.getLocal(namespace);
trace("Shared object created\nNamespace is "+namespace);
}
//so = SharedObject.getLocal("JSFlashStorage");
makeSO();
function setVar(varname:String,val:String)
{
so.setProperty(varname,val);
so.flush();
}
function getVar(varname:String):Object{
trace(so.data[varname]);
return so.data[varname];
}
function allVars():Object{
return so.data;
}
//var mass:Object=allVars();
//for(
function clearVars(){
so.clear();
}
/////////////setting js interfaces/////////////////////////////
ExternalInterface.addCallback("setVar", setVar);
ExternalInterface.addCallback("getVar", getVar);
ExternalInterface.addCallback("allVars", allVars);
1 не могу обратиться к методам
2 появляются посторонние ссылки