You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, October 3rd 2010, 3:46pm

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:

Source code

1
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.

Source code

1
2
3
4
5
var progress:* = krpano.get("progress");
while(!progress.loaddone)
{
 	progress = krpano.get("progress");
}


What am I doing wrong?

Markooze
--
Visit Website: www.virtual-panorama-tours.de

This post has been edited 1 times, last edit by "Makooze" (Oct 3rd 2010, 4:11pm)


jmulder

Beginner

Posts: 17

Location: Amsterdam, Netherlands

  • Send private message

2

Tuesday, October 5th 2010, 9:09pm

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

Source code

1
2
3
4
5
6
7
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.

3

Wednesday, October 6th 2010, 10:44am

Hi,

as a matter of fact i did already think about this solution and it probably would be more as3 style.

It works just fine, but I'm still curious whether the other approach is feasible.

Makooze
--
Visit Website: www.virtual-panorama-tours.de