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.

magnus

Beginner

  • "magnus" started this thread

Posts: 17

Location: Germany

Occupation: Student

  • Send private message

1

Sunday, October 11th 2009, 11:49pm

onovercrop

Hello,

I am using one a png image for all my buttons in a panorama, and am cropping parts from it for the buttons and the images for the onover event.

Source code

1
2
3
4
<plugin name="help"
	url="buttons/buttons.png"
	crop="96|0|16|16"
	onovercrop="96|16|16|16" />


The problem is, that when I am holding the left mouse button pressed while being on a button and moving the mouse away from the button it keeps the crop from the onover event and does not go back to the original button image. In my example the button says red (onover colour) instead of going back to black (normal colour).
Is there any workaround for this problem?

Thanks in advance,
Magnus

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

2

Monday, October 12th 2009, 1:42am

Hi magnus,

I have tried with the buttons example that comes with krpano download file...
And I noticed that, when you have only crop and onovercrop defined and ondowncrop not defined, then the button acts as you explain above....
Simply define the ondowncrop with the same value as crop or onovercrop or a new value for button pressed...

Salut.

magnus

Beginner

  • "magnus" started this thread

Posts: 17

Location: Germany

Occupation: Student

  • Send private message

3

Monday, October 12th 2009, 3:29pm

Thanks a lot for the help again, michel.
Your solution works fine for me, even when using a new picture for ondowncrop it switches back to the original picture when I am releasing the mouse button.

I was hoping to get around using another attribute but as long as it works I am fine with this solution.

Similar threads