Plugin parameter not changing in as3 plugin

  • So I have a flash plugin that i've been working on and i'm having trouble getting updated parameters from krpano.
    in the xml I have:


    And inside the flash plugin I register the change event and try to get the parameter connect_on

    However, connect_on remains true and doesn't toggle. I wasn't sure if the krpano interface just gets the initial state krpano and doesn't change? or if I was accessing it incorrectly.
    Any help would be appreciated.

  • Read more: ActionScript 3.0 Type Conversions

  • Awesome, that worked.
    I thought that setting it to "true" in krpano would resolve it to the boolean value, so 'get' would return a bool. Wouldn't have thought of having to convert it, thanks a bunch.

  • Hi,

    I thought that setting it to "true" in krpano would resolve it to the boolean value, so 'get' would return a bool. Wouldn't have thought of having to convert it, thanks a bunch.

    which krpano version are you using?
    the 1.0.8.14 versions should do that, the 1.0.8.12 is only converting numbers,

    best regards,
    Klaus

  • You can't convert/typecast to boolean like that.

    someboolean:Boolean = "false" will return true, because it has content.

    I always use:

    Code
    public static function stringToBoolean(str:String):Boolean
        {
            return (str.toLowerCase() == "true" || str == "1");
        }

    when converting

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!