So that will be a security error. On the page, make sure you have allowScriptAccess to be "always" or "sameDomain"
On the swf side check out: http://www.wrichards.com/blog/2009/02/error-calling-method-on-npobject/ Aran <http://www.wrichards.com/blog/2009/02/error-calling-method-on-npobject/> On Thu, Mar 25, 2010 at 2:25 PM, Benjamin <[email protected]> wrote: > Hi, I'm using swfobject 2.2 on firefox 3.6 with flash 10. I don't know > any flash but I do have a swf file that I want to interact with using > javascript. The problem is that I get an error when I try to interact > with the object. > > I use this syntax to embed the swf: http://pastebin.com/qWkGF9bW > > then I'll do something like > > var swfobj = document.getElementById("swfobj"); > alert(swfobj.doSomething) > > which will print out something like: > > function doSomething() { > [native code] > } > > I assume this means the function exists, however I get this error when > I try to call the method swfobj.doSomething(true): > > Error calling method on NPObject! > > What does this mean? Does it have anything to do with > allowscriptaccess? Is it possible that this is happening because of > something I've done wrong on the javascript side of things? > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
