Operator Flash versus HTML5

  • I've tried to use an undefined variable call myVar and to test it's value.
    Here are my results with 1.19pr10 with no test which work on HTML5 and Flash at the same time. Before Flash player was working with myVar === null but not on the pr10.

    1) === null

    trace("before");
    if(myVar === null,
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    done
    after

    Console Flash
    before
    after

    Note: doesn't work even with <krpano strict="true"></krpano> attribute.

    2) == null

    trace("before");
    if(myVar == null,
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    after

    Console Flash
    before
    after

    3) === undefined

    trace("before");
    if(myVar === undefined,
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    done
    after

    Console Flash
    before
    after

    4) == undefined

    trace("before");
    if(myVar == undefined,
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    after

    Console Flash
    before
    done
    after

    5) === "undefined"

    trace("before");
    if(myVar === "undefined",
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    after

    Console Flash
    before
    done
    after

    6) == "undefined"

    trace("before");
    if(myVar == "undefined",
    trace("done");
    );
    trace("after");

    Console HTML5
    before
    after

    Console Flash
    before
    done
    after

    Edited once, last by benji33 (August 8, 2017 at 10:58 AM).

  • Hi,

    I can't reproduce this case:

    I'm getting the same results in Flash and HTML5: before - done - after.
    And there were no changes here in the recent releases...

    Best regards,
    Klaus

  • OK I've found the issue. My test is on a variable declared into the embed code with

    Code
    ,vars:{myVar:value}

    .

    In this case if the value is not defined the result of myVar is null and the operator comparison fails as said above. Not a common case :)

Participate now!

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