Accessing progress variable from plugin

  • Hi everybody,

    within a plugin I'd like to figure out when a panorama is completely load.
    Therefore I access the variable progress with:

    Code
    var progress:* = krpano.get("progress");

    The first time I access the progress-variable everything is fine,
    but when I try to check, for example, progress.loaddone in a while-loop
    the variable is not reloaded.

    Code
    var progress:* = krpano.get("progress");
    while(!progress.loaddone)
    {
     	progress = krpano.get("progress");
    }

    What am I doing wrong?

    Markooze

  • If all you need to know is when it's done, I think this should work.

    Code
    function registerEvent (e:DataEvent):void {
        krpano.set('events.onloadcomplete', onLoadComplete);
    }
    
    
    function onLoadComplete ():void {
        // ...
    }

    I wouldn't know the required arguments for the method, but I'm guessing no arguments.

Jetzt mitmachen!

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