call a function after 'lookto'?

  • how would i go about calling a custom actionscript function after a 'lookto' is complete?


    krpano.call("lookat(-145,0,80);"); // <-- would like to call a function after this happens


    thanks!

    Say "Hi!" on twitter

    Edited once, last by mds (July 9, 2009 at 7:26 AM).

  • could you also call a defined action that included the lookto and then the next function?

    Code
    krpano.call("action(my_action);");
    
    
    <action name="my_action">
        lookat(-145,0,80);
        action(nextaction);
    </action>

    not sure if all of the syntax is correct... but hopefully the concept might work.

  • well i tried to write in my action after the 'lookto' action but i think since it was a custom function (to show the instructions) that it reads the function at the very beginning as opposed to waiting it's turn like the kr functions.

    i thought there would be an easy solution like this:

    Code
    krpano.call(lookto, 150,0,15, onComplete:myfunction(););

    but i couldn't get it to work.

    instead i used the tweener class like this:

    that makes it wait 6 seconds before fading in and then fires instructionsInti(); to begin the animation.

Participate now!

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