Hello, I have been trying to use this great library to embed some flash dynamicly and then access the flash API via javascript (ExternalInterface). The problem I am having seems to be, because I try to access the flash element right after the call to swfobject.embedSWF, the element does not seem to be ready yet.
For example, starting with the example code from http://www.pipwerks.com/lab/swfobject/ExternalInterface/2.0/dynamic.html (Thanks for the example!), if I were to modify the following javascript in the dynamic.html global scope by trying to get at the swf object I get an "swf is null". However the event handling code that access the flash element still works ok, indicating that the flash did get embedded ok. swfobject.embedSWF("ExternalInterfaceExample.swf", "flashcontent", "550", "200", "8", false, flashvars, params, attributes); var swf = document.getElementById("ExternalInterfaceExample"); //added line swf.sendTextToFlash(text); //trying to use the flash object right after embedding it Is this because the flash element is not ready yet ? How would I implement something that needs to be run right after the call to swfobject.embedSWF ? The examples I have seen always make use of the swfobject in some event handler and not right after the call to swfobject.embedSWF. Any help would be greatly appreciated. Mohan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to swfobject@googlegroups.com To unsubscribe from this group, send email to swfobject+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---