townivan
07-09-2006, 08:57 AM
Has anyone else run into this?
I want to pass a boolean to my plugin so I do something like:
var variables:Object = new Object();
variables.b1 = myBoolean;
es.pluginRequest("myPlugin", "myMethod", variables);
and in the plugin I receive it like:
function pluginRequest(hash) {
var method = hash.get("Method");
var caller = hash.get("ExecutingUserName");
if (method == "myMethod") {
b1 = hash.get("b1");
}
b1 is not a boolean. When I run:
trace("b1 type = " + typeof b1);
It's an object. :confused:
I can't use:
b1 = Boolean(hash.get("b1"));
because that will always translate into true;
I want to pass a boolean to my plugin so I do something like:
var variables:Object = new Object();
variables.b1 = myBoolean;
es.pluginRequest("myPlugin", "myMethod", variables);
and in the plugin I receive it like:
function pluginRequest(hash) {
var method = hash.get("Method");
var caller = hash.get("ExecutingUserName");
if (method == "myMethod") {
b1 = hash.get("b1");
}
b1 is not a boolean. When I run:
trace("b1 type = " + typeof b1);
It's an object. :confused:
I can't use:
b1 = Boolean(hash.get("b1"));
because that will always translate into true;