The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
Hello,
I am looking to call a webpage (www.google.com as an example) when you click on a picture.
I know there is a hyperlink in studio, but I couldn't figure out how to add an image over it rather than seeing text.
So I was thinking of using an image and then in the click action have some java called to call up the webpage.
Has anyone done that before?
Thanks!
Andrew
I guess there are may ways to do it, one being using CSS.
First drop a hyperlink on the 2D canvas where you want it.
Leave the Text property blank, set its URL property to the URL and give it a class, such as hyperlink-with-image
Then upload a graphic resource in the RESOURCE > Uploaded section, such as ptc.png
Then go to STYLES > Application and add some CSS as follows:
.hyperlink-with-image {
display: block;
background-image: url(#{$resources}/Uploaded/ptc.png);
background-repeat: no-repeat;
background-size: contain;
width: 100px;
height: 100px;
}
HTH,
Alessio