hotlinks from clickable objects

08 January 2015 21:01 #987
With 2 JSON files with 1 model each, only the first loaded will glow.

With two objects in the same JSON, they will both glow.

Is there a way to load multiple JSON files and have them all glow?


function load() {
m_data.load("json/singleModel.json", load_cb);

m_data.load("json/twoModels.json", load_cb);



var m_mouse = require("mouse");

function main_canvas_click(e) {

var YSbox1= m_scenes.get_object_by_name("singleModel");
if (obj && == "singleModel")"")
m_scenes.apply_glow_anim(YSbox1, 1, 1, 0);

var YSRCbox= m_scenes.get_object_by_name("twoModelsA");
if (obj && == "twoModelsA")"")
m_scenes.apply_glow_anim(YSRCbox, 1, 1, 0);

var product2= m_scenes.get_object_by_name("twoModelsB");
if (obj && == "twoModelsB")"")
m_scenes.apply_glow_anim(product2, 1, 1, 0);



09 January 2015 10:14 #995
In the get_object_by_name(name, data_id) function there is a second argument, using which you can access multiple loaded scene files. Again, look at this canonical example.
Development Lead | Twitter
19 February 2015 17:24 #1458
being able to open webpages with clickable objects (or sections of the object as clickable for hotlinks and other sections of same object clickable for moving it around) would make for fun online catalogs.
Works since 15.01 in the NLA Script.
FYI: hover glow not working in IE 11
Works since 15.02.
Development Lead | Twitter
19 February 2015 20:15 #1462
I have been using the javascript file to make objects hotlinks, etc., but B4W keeps getting better and better, and each release offers awesome features.
Please register or log in to leave a reply.