Page 1 of 1

Map Element with info text which opens a website

Posted: Tue Jun 12, 2018 1:19 pm
by Hopki
Hi,
It was asked that using the Map Element in the skin that it should show an information box on mouse over and when the information box is clicked it should then open a web page in the player.

The attached project does this and a bit more and this is how:

The info text box picks up its text from the nodes user data Information text field.
The URL is also stored in the user data, Source.

The skin is using variables and logic blocks but the important part is the text box is using the place holder $(ui), this pick up the text in the user data text field “user data Information”.
The text box also has an action, Mouse Click, Set Value, Target web_page.
The Value is an iframe which also uses a user data place holder $(us).

Code: Select all

<iframe src="$(us)" width="100%" height="100%" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" frameborder= “0"></iframe>
So in the her data Source you enter the URL it should open.

I have pimped out the skin so you can select if you want the URL to open in the player or a new browser window but the above is the key points.

One other thing is there should not be any gap between the map pin and text box, if there is the mouse will lose focus and the text box will hide, with it overlapping the mouse keeps focus on the map pin as the text box is a child of it.

Regards,
Hopki