Forum

User posts trepaning
29 December 2014 00:52
Thank you very much, your assistance is as excellent as your product.
28 December 2014 21:33
What I am asking is where do I add lines such as

if (obj && m_scenes.get_object_name(obj) == "Cube"))


27 December 2014 20:20
where do I find Scenes Module?
27 December 2014 01:08
Confirmed from my previous post,

To add more objects with a variety of URL options in a scene, add more lines like this:

if (obj && obj.name == "Cube")
window.location.href = "http://www.blend4web.com";
if (obj && obj.name == "Plane")
window.location.href = "http://www.anotherURL.com";
if (obj && obj.name == "Sphere")
window.location.href = "http://www.trepaning.com";

However, using localhost to test, the URLs after the primary do not work with Chrome, but do work with IE and FF.

Here is my quick test using the supplied file. Clicking the TEXT will take browser to my site.

http://www.trepaning.com/b4w/clickTest/

I don't have mobile. Do the hotlink clicks register with mobile touch?

26 December 2014 22:07
That works as expected, thanks.

To add more objects with a variety of URL options in a scene, I simply have to add more lines like this?:

if (obj && obj.name == "Cube")
window.location.href = "http://www.blend4web.com";
if (obj && obj.name == "Plane")
window.location.href = "http://www.anotherURL.com";
if (obj && obj.name == "Sphere")
window.location.href = "http://www.trepaning.com";


Again, for my purposes, if it is a security issue that may make links inoperable in some browsers, I do not need pages to open outside of the domain. Other people may require that, but my focus would not, if that helps with a different bit of coding from your end.

As it is, this is great, but of course to stick with the "no coding required" element of B4W, it would be nice to be able to add the links to objects from the Blender interface.
26 December 2014 03:57
this ThreeJS page on my domain, toss a ball at the block hanging in the air, switch to a new page

http://www.trepaning.com/3js/elvisWalls/pageChange-eventTriggered.html

26 December 2014 03:45
loading pages from the same domain would be totally fine, I am not asking for page loads outside of the specific site. I am thinking of a 3d store with products on the shelf and when a product is clicked on, it goes to the static product page. I was able to do this with threejs.
25 December 2014 20:01
I am told this is possible via API.

I Just had to look up what API stands for.

I would like this feature to the part of the interface, where I can make an object SELECTABLE, have an option to make that SELECTABLE object a HOTLINK and add the URL, and have the standard "open in same window or new window" option. I don't know why the NLA needs to be involved or why I have to mess with API to make this happen, but I have stated my request and I hope B4W Santa hears me!
24 December 2014 21:19
With the latest release of B4W, the Glube can now be played in Chrome and Firefox.

http://www.trepaning.com/b4w/glube-b4w-musical-01.html

Thanks for the work to make that happen!
24 December 2014 20:01
fantastic, downloaded and will check it out. Does this release also include being able to click on an object and have it open a new page?