I am embedding Flash object (a tiny component) based on selection in ui.
so lets say based on combination of user selection flash component is loaded.
i have modified AC_FL_RunContent to return html string of flash.
function loadDynamic(choice)
{
// manipulate flashVars
var flashVars = "";
flashVars=flashVars + "Choice="+choice+"&";
flashVars=flashVars + "viewType=create"+"&";
var htmlString = AC_FL_RunContent(
"movie", "MyComponent",
"src","/MyComponent",
"FlashVars",flashVars,
"width", "100%",
"height",height,
"align", "middle",
"id", "MyComponent",
"quality", "high",
"bgcolor", "#FFFFFF",
"name", "MyComponent",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
$("#flexDiv").html("");
$("#flexDiv").html(htmlString);
}
There is another update button. On click of it i need to call update of flash
function updateData()
{
if(window.document.MyComponent)
window.document.MyComponent.update();
return false;
}
dynamic loading works proper in all other browser but
it works fine in IE if my flash is getting loaded while document load.
it does not work in IE on dynamic creation of flash and embedding to html
it says Object doesn't support this property or method on
"window.document.MyComponent.update();"