reverse connection as3_interface

  • Hello,

    I have a little problem again. Iam creating the map to krpano in flash and I don't know to call actionscript function from krpano via as3_interface

    for better notion:
    I press the button in krpano panorama,... and call action in actionscript flash map plugin.

  • Hi,

    to call your own as3 function from krpano xml your function must be added first,

    e.g.
    this could be done in this way:

    as3: (the code is for krpano version 1.0.8 beta 8 or higher)

    Code
    function yourfunction(p:String):void
    {
       krpano.trace(0, "call from krpano - p=" + p);
    }
    
    
    ...
    
    
    krpano.set("yourfunction", yourfunction);

    xml:

    Code
    ... onclick="yourfunction('hello from xml');"

    best regards,
    Klaus

  • Thanks a lot.

    excellent explanation but... ! *confused*
    You send me back to krpano. I want to call function in flash. Thanks *smile*

    my xml:

    Code
    onclick="yourfunction('function_in_flash();');"

    and as3:

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!