Page 1 of 1
Detecting Image Name On mouseUp
Posted: Sun Jul 21, 2019 4:31 am
by Googie85
Hi Guys!!
I am trying to get the name of an image when mouseUp is generated. Any ideas would be appreciated!!!!
Many Thanks,
Googie.
Re: Detecting Image Name On mouseUp
Posted: Sun Jul 21, 2019 9:14 am
by richmond62
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;
Code: Select all
on mouseUp
put the short name of me
end mouseUp
Re: Detecting Image Name On mouseUp
Posted: Sun Jul 21, 2019 10:29 am
by bogs
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