views:

175

answers:

0

Hi,

Is there a way to avoid the time delay required to access the functions defined inside a SWF object after dynamically adding the object to the DOM.

for example,

1) I'm using swfobject.js api to add swf object dynamically add the SWF object to the DOM.

var oSWF = new SWFObject("SWF Object path reference","SWF object ID", "100%","700", "#FFFFFF","low");

2) window/document["SWF object ID"].functionInsideSWF returns "undefined" for the first time.

Trying step(2) with a timer delay of say 2500 ms works 98% of the time.

Thanks in advance.