hi all,

is there someone experience the same problem like me? I'm trying to
run fl.js (it can be found on internet) with the Rhino script engine.
I got this error:

org.mozilla.javascript.EcmaError: TypeError: [JavaPackage
org.openx.SWFObject] is not a function, it is object.

when evaluate this expression:

var so = new FlashObject("movie.swf", "mymovie", "400", "200", "8",
"#336699");

The problem is in fact org.openx.SWFObject refers to function and to
Object as the compiler says.

The definitions looks like:

if(typeof org=="undefined"){
  var org=new Object();
}
if(typeof org.openx=="undefined"){
  org.openx=new Object();
}
if(typeof org.openx.util=="undefined"){
  org.openx.util=new Object();
}
if(typeof org.openx.SWFObjectUtil=="undefined") {
  org.openx.SWFObjectUtil=new Object();
}
org.openx.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){
  // some function code here
}
.....
var FlashObject = org.openx.SWFObject;
var SWFObject = org.openx.SWFObject


I wonder if this error is because of the LiveConnect or JavaPackage
which tries to load FlashObject as real Java object instead of
javascript definition.

Is it possible to disable JavaPackage in this case or to write hosted
object FlashObject (like a mock) to overload the js definition?

Thanks
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to