Error calling method on NPObject!

212 views
Skip to first unread message

Benjamin

unread,
Mar 24, 2010, 11:25:21 PM3/24/10
to SWFObject
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?

Aran Rhee

unread,
Mar 25, 2010, 1:41:54 AM3/25/10
to swfo...@googlegroups.com
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:


Aran



--
You received this message because you are subscribed to the Google Groups "SWFObject" group.
To post to this group, send email to swfo...@googlegroups.com.
To unsubscribe from this group, send email to swfobject+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.


Reply all
Reply to author
Forward
0 new messages