Using both onpreviewcomplete and onloadcomplete for little planet animation and slow Internet connections?

  • I've combined onpreviewcomplete and onloadcomplete in order to have a little planet loading intro but without causing a nasty time lag for anyone on a slow internet connection... but I am not sure if this approach is the best way or whether this is thread safe?

    The idea here is that the intro animation happens 4 seconds after preview loading at the latest. Someone on a fast Internet connection that loads the images within 4 seconds gets the intro animation straight away. I am using multi-resolution panoramas.

    Incidentally when I say "thread safe" what I mean is that the anim action checks the value of istat before deciding whether to change it and kick of the normalview() animation... unless access to istat is synchronized (or unless only one action can execute at any one time) there is potential for a problem here I think???

    You can see this in action on http://www.jamesrigg.com/ . I'd really appreciate any comments about whether there is a better way to do this or other ways to optimise loading to provide the best experience for both slow and fast Internet connections while using very high resolution multi-resolution panoramas.

    Thanks
    James.

Participate now!

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