You are not logged in.

1

Thursday, September 22nd 2011, 10:36am

krpano key down

Hi,

I try, that if i click key down '38', it should go to the next pano. it works but changes firsly view (currently pano view, picture down) and then work my script for key down.

There is a trick, that i can avoid that problem.

Thanks in advance

2

Monday, September 26th 2011, 6:18pm

Hi,

the onkeydown event is fired as long as the key is down,
you could either just use the onkeyup event or a bit more complexly - check if the key is already pressed,

e.g.

Source code

1
2
3
4
<events onxmlcomplete="set(key38pressed,false);"
    	onkeydown="if(keycode == 38, if(key38pressed == false, set(key38pressed,true); trace('key38 pressed - do your code here'); ));"
    	onkeyup="if(keycode == 38, set(key38pressed,false));"
    	/> 


best regards,
Klaus