Hi Guys!!
I am trying to get the name of an image when mouseUp is generated. Any ideas would be appreciated!!!!
Many Thanks,
Googie.
Detecting Image Name On mouseUp
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 5393
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Detecting Image Name On mouseUp
That's all going to be a bit tedious as the obvious way to effect that
is by having code in the scriptEditor of each image;
is by having code in the scriptEditor of each image;
Code: Select all
on mouseUp
put the short name of me
end mouseUp
Re: Detecting Image Name On mouseUp
Well, you could also just use the target in the card or stack level script, with the mouseDown or Up event -
Code: Select all
local myLocalVar --< this variable is outside of any handler,
-- and so is available to all handlers from here to the end
-- of the page
on mouseDown
put the name of the target into myLocalVar
end mouseDown
on mouseUp
if word 1 of myLocalVar = "image" then ...-- your code for when an image is clicked...
end mouseUp
