HI,

I am trying to call a method defined in flash object from javascript
(firefox-3.0/Linux) and getting the exception: "NPMethod called on
non-
NPObject wrapped JSObject".

If I use eval on window.document.flash_object.func() it throws
"NPMethod called on non-NPObject wrapped JSObject".

Where as, if I define a javascript function in side the page as given
below:

function myFunc() {
return flash_object.func();

}

and later do a eval of window.document.myFunc() it works fine.

I am running the two evals through a test framework called Selenium.
[eval(window.document.flash_object.func()) and
eval(window.document.myFunc())].

Is this something to do with javascript sandboxing? Any ideas on
debugging this further?

Another point worth noting is: this exception occurs when firefox is
used in *chrome mode, if its used in normal mode this exception doesnt
occur. Is there any difference in js eval() between chrome mode and
normal firefox mode?

Let me know if you need any other information.

Thx,
Chandra

================================================== =======================

For those who are interested in looking at the Selenium testcase and
html page, here are the details:

Sample Selenium Testcase:

public void testClick() {
Selenium selenium = new DefaultSelenium(HOST, PORT, "*chrome /usr/
bin/firefox-3.0", "http://myhost/");
selenium.start();
selenium.open("/Colors/colors.html");

// javascript wrapper over the flash object method - This works
fine.
selenium.getEval("window.getColor();");

// flash object method invocation - This fails with NPObject
related exception.
selenium.getEval("window.document.mymovie.getColor();");