Hi,
Is there a way i can have it so when the user hovers their mouse over an image well some code runs?
I tried mouse over/enter but it never seemed to get called.
thanks in advance
Hi,
Is there a way i can have it so when the user hovers their mouse over an image well some code runs?
I tried mouse over/enter but it never seemed to get called.
thanks in advance
on mouse entered theObject event theEvent
tell window "main"
if theObject is image view "imagewell" then
set contents of text field "thetext" to "Stop hovering over me!"
end if
end tell
end mouse entered
on mouse exited theObject event theEvent
tell window "main"
if theObject is image view "imagewell" then
set contents of text field "thetext" to "Hello!"
end if
end tell
end mouse exited
You also need to link the imagewell object to your applescript in Interface Builder, and give it a name (or use the ID).
Hereโs a pic of the IB screen:
http://img410.imageshack.us/img410/4930/picture25vk8.png
demo:
mouseover: http://img339.imageshack.us/img339/103/picture22di1.png
mouseout: http://img151.imageshack.us/img151/2526/picture23fk4.png