Sie sind nicht angemeldet.

1

Sonntag, 4. Mai 2014, 21:56

error #1009 at krpano::krpano_hotspot/render()

Dear Klaus,

recently I've been getting an error, when the following block of as3 code gets executed:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
var xCoord: Number = localToGlobal(new Point()).x - stage.stageWidth * (1 - parseFloat(String(_krpano.get("area.width")).slice(0, -1)) / 100);
var yCoord: Number = localToGlobal(new Point()).y - stage.stageHeight * (1 - parseFloat(String(_krpano.get("area.height")).slice(0, -1)) / 100);

_ath = parseFloat(parseFloat(_krpano.get("screentosphere(" + xCoord + "," + yCoord + ")").split(',')[0]).toFixed(4));
_atv = parseFloat(parseFloat(_krpano.get("screentosphere(" + xCoord + "," + yCoord + ")").split(',')[1]).toFixed(4));

_krpano.set("hotspot[" + _id + "].ath", _ath);
_krpano.set("hotspot[" + _id + "].atv", _atv);

x = 0;
y = 0;

if(_krpano.get("hotspot[" + _connectorName + "]")) {
	_krpano.set("hotspot[" + _connectorName + "].point[1].ath",  _ath);
	_krpano.set("hotspot[" + _connectorName + "].point[1].atv",  _atv);
}

_krpano.call("updatescreen");


I tried to write you a PM with the link and some images so that you could check it out in real-time, but I see you are not accepting PMs.

Perhaps you have any idea what is happening here based on just the code above? This is of course just a small block, sadly the complete source is very complex, and thousands of lines long.

Btw, there was no error in version 1.0.8 which we've been using for a long time. Error came after updating to 1.16.9, and still persists now in 1.17.

Thanks in advance, sincerely,
Chris

2

Montag, 5. Mai 2014, 08:00

Hi,
I tried to write you a PM with the link and some images so that you could check it out in real-time, but I see you are not accepting PMs.
You can send me anytime mails of course!


This part that looks strange to me is that code:

Quellcode

1
2
_krpano.set("hotspot[" + _connectorName + "].point[1].ath", _ath);	
_krpano.set("hotspot[" + _connectorName + "].point[1].atv", _atv);


You are directly setting point[1], but whats about point[0]?

By the way Flash works, this will create an item at [1] and leave [0] empty, but krpano isn't expecting empty point items - and this can be the problem.

Best regards,
Klaus

3

Montag, 5. Mai 2014, 10:09

Thanks for the quick reply. I'll try to see if that is the problem here, and if not, I'll drop you a mail :)