Initial animation start or not

  • Hi,
    I use initial action when my panoramas load to set some predefined view:

    Code
    onstart="wait(BLEND);wait(1.5);lookto(36,-1,53,smooth(180,-180,90));"


    It works fine, but sometimes panorama is already set to this position at start, so this actions doesn't affect the view. Panorama is blocked for few seconds and it is very annoying.

    I was trying to compare view parameters with values in this function but with no success - onstart action doensn't want to compare this values and dodn't output anything to log window:

    Code
    onstart="if(view.hlookat != 36, trace(animate);wait(BLEND);wait(1.5);lookto(36,-1,53,smooth(180,-180,90));, trace(notanimate));"


    What code should I fire this actions only when panorama is in different position?

    Regards,
    Myksa

    Edited once, last by myksa (May 17, 2011 at 1:46 PM).

Participate now!

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