cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Call a webpage with "Click" action of a picture

Participant

Call a webpage with "Click" action of a picture

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

 

 

1 REPLY 1

Re: Call a webpage with "Click" action of a picture

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

 

hl1.png

 

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