• Nope, krpano functions don't have returnvalues.
    This is what you would do:

    Code
    mul(term, 82, 2);
    add(tmp, tmp, term);


    This first creates a variable term by multiplying 82 by 2, and then adds this to variable tmp.
    Alternatively you can shorten the second line:

    Code
    mul(term, 82, 2);
    add(tmp, term);

    For most functions, the convention is that the first argument is (the name of) the variable which will hold the result.

  • Hi ahoeben,

    thanks...for your reply.

    aslo i have one more issue.
    i am gettting the "action call' event in variable.

    set(abc, action1(););

    now i want to call using get(abc).
    it will show the right value in trace(get(abc));

    but is not call the action1(); using get command.

    is there way to call the action1() from abc variable.

    thanks

    --
    Pratiks

  • Hi Pratiks,

    Quote

    i am gettting the "action call' event in variable.

    set(abc, action1(););

    now i want to call using get(abc).

    You can use a call() action for that.... ( KLAUS, call() seems to be missing in current documentation..)

    Code
    set(abc, action1());
    call(abc);

    SAlut.

  • I know that krpano does not require you to put quotes around string values ("text"), but it might help you to make things more legible.

    Try this instead:

    Code
    set(abc, "action1()");
    call(get(abc));

    edit: michel beat me to it...

  • Hi All,

    thanks all for your support... :)

    I have tried both call(get(abc)); and call(abc); the way but none of these are working for me.
    I am calling that event from
    <scene name="scene_pano1" onstart="call(get(abc));">

    I am getting following error in my Safari iPad useragent.
    WARNING: unknown action command: abc

    I forgot to mention it is going be used for iPad/iPhone.

    thanks

    --
    Pratiks

    Edited 3 times, last by pratiks (May 20, 2011 at 8:12 AM).

Participate now!

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