tags:

views:

42

answers:

0

I am trying to call the flash plugin function TotalFrames() from my extension javascript code.

var docobj = content.document.wrappedJSObject;
var flashobj = docobj["myswfid"];
alert("The total number of frames is " + flashobj.TotalFrames());

How ever if I try to run this javascript on a webpage, it works fine. It fails to run from the extension giving the error "Error: NPMethod called on non-NPObject wrapped JSObject!"