Just like flashvars you can pass values to Flash even if you are using swfobject to display your flash. Below is the code to do that -
var so = new SWFObject("flash/465x535.swf", f_size, "385", "535", "9", "");
so.addVariable("file_path", "filename.jpg");
file_path is the variable which will be passed to Flash. Now to capture the value in Flash using AS3 the code will be as follows -
var filepath = root.loaderInfo.parameters.file_path;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment