How do I get a image to appear in the image box when the mouse hovers over the linked word?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How do I get a image to appear in the image box when the mouse hovers over the linked word?
(FYI I am a complete beginner)
It's from livecode university and its not doing what it is supposed to.
Its supposed to make a picture appear in the image box when the mouse
hovers over a link.
here is the code
on linkClicked wordClicked
put wordClicked & ".jpg" into flowerPic
put image flowerPic into image "showPic"
end linkClicked
I have named everything accordingly but it doesn't do anything?
any help would be appreciated
cheers!
It's from livecode university and its not doing what it is supposed to.
Its supposed to make a picture appear in the image box when the mouse
hovers over a link.
here is the code
on linkClicked wordClicked
put wordClicked & ".jpg" into flowerPic
put image flowerPic into image "showPic"
end linkClicked
I have named everything accordingly but it doesn't do anything?
any help would be appreciated
cheers!
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Hi Pan, and welcome!
The code of interest would actually be the call to the handler posted - I’m guessing either in a mouseMove handler?
The code seems OK, assuming you have a jpg with that name in your stack. But this needs something to trigger it - how are you calling this handler?
Stam
The code of interest would actually be the call to the handler posted - I’m guessing either in a mouseMove handler?
The code seems OK, assuming you have a jpg with that name in your stack. But this needs something to trigger it - how are you calling this handler?
Stam
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
In other words, the linkClicked message only fires when the linkText is, er, clicked - there is no linkHover message.
So you will need to use something like (as stam suggested) a mouseMove or mouseChar or mouseCharChunk or mouseText handler to check the content under the mouse pointer, and decide whether it is over the "link" in which case you can trigger the image display.
So you will need to use something like (as stam suggested) a mouseMove or mouseChar or mouseCharChunk or mouseText handler to check the content under the mouse pointer, and decide whether it is over the "link" in which case you can trigger the image display.
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
While I have the LiveCode University backed up, I cannot get it to work on MacOS 12.5 beta because it is a 32-bit app.
So, what follows is guess work:
- -
So, NO 'hover'; CLICK!
So, what follows is guess work:
Makes NO sense at all, as the message is linkClicked:Its supposed to make a picture appear in the image box when the mouse
hovers over a link.
- -
So, NO 'hover'; CLICK!
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
This works as per the recipe:
- -
- -
- Attachments
-
- Flower Power.livecode.zip
- Stack.
- (25.69 KiB) Downloaded 125 times
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Tangentially . . .
It might not be a bad idea if LiveCode central were to issue a Macintosh version of LiveCode University
that worked on 64-bit systems.
It might not be a bad idea if LiveCode central were to issue a Macintosh version of LiveCode University
that worked on 64-bit systems.
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
It would seem simpler to make it something that can be run right in the IDE, no?richmond62 wrote: ↑Fri May 27, 2022 4:25 pmTangentially . . .
It might not be a bad idea if LiveCode central were to issue a Macintosh version of LiveCode University
that worked on 64-bit systems.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Yes, it would, and the reason that occurred to you and not to me is because you areIt would seem simpler to make it something that can be run right in the IDE, no?
up there with the demigods, while I . . . well anyway, let's not go there.

-
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Forget you and me, I'm more curious about the perceived benefit in the team for adding the extra step to their workload to turn it into a standalone that doesn't integrate with the IDE. :/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
You could ask them why they did that.
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
On the rare day when I have something truly insightful to offer I'll share it with them. Making tools for learning the IDE that operate directly in the context of use doesn't seem particularly insightful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10098
- Joined: Fri Feb 19, 2010 10:17 am
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Quite . . . you know my view on that.
Re: How do I get a image to appear in the image box when the mouse hovers over the linked word?
Richmond has demonstrated very nicely the linkClicked functionality.
Here is a version which demonstrates the ability for grouped text (where the textStyle is "link") to span over more than one word, and for the linkText to be set to something specific (in this case, the whole image name including .jpeg extension).
Then, to create the mouseOver "hover" effect, the mouseMove handler in the field will trigger according to the linkText of the mouseText.
Here is a version which demonstrates the ability for grouped text (where the textStyle is "link") to span over more than one word, and for the linkText to be set to something specific (in this case, the whole image name including .jpeg extension).
Then, to create the mouseOver "hover" effect, the mouseMove handler in the field will trigger according to the linkText of the mouseText.