problem with dynamically create hotspot onclick

  • Hi All,

    i'm having a problem regarding on onclick on dynamically created hotspot:


    <datavtourbuilding name="bldg1" country="country1" city="city1" />
    <datavtourbuilding name="bldg2" country="country1" city="city1" />
    <datavtourbuilding name="bldg3" country="country1" city="city1" />
    <datavtourbuilding name="bldg4" country="country1" city="city1" />
    <datavtourbuilding name="bldg5" country="country1" city="city1" />

    for(set(bldg,0), bldg LT datavtourbuilding.count, inc(bldg),
    txtadd(bldgname,'bldg_',get(bldg));
    txtadd(bldgurl,'/office/',get(datavtourbuilding[get(bldg)].country),'/',get(datavtourbuilding[get(bldg)].city),'/',get(datavtourbuilding[get(bldg)].name),'/',get(datavtourbuilding[get(bldg)].name),'.jpg');
    txtadd(bldgtour,'/office/',get(datavtourbuilding[get(bldg)].country),'/',get(datavtourbuilding[get(bldg)].city),'/',get(datavtourbuilding[get(bldg)].name),'/index.html');
    addhotspot(get(bldgname));
    set(hotspot[get(bldgname)].style,VR_Menu_Style);
    set(hotspot[get(bldgname)].keep,'true');
    set(hotspot[get(bldgname)].url,get(bldgurl));
    set(hotspot[get(bldgname)].rx,0);
    set(hotspot[get(bldgname)].ath,get(asd1));
    set(hotspot[get(bldgname)].atv,0);
    set(hotspot[get(bldgname)].depth,1500);
    set(hotspot[get(bldgname)].scale,1);
    set(hotspot[get(bldgname)].distorted,'true');
    set(hotspot[get(bldgname)].alpha,1);
    set(hotspot[get(bldgname)].zorder,2);
    set(hotspot[get(bldgname)].onover,tween(scale|hotspot[VR_Hover].alpha|hotspot[VR_Hover].scale|hotspot[VR_Text].alpha,1.1|1|1.1|1);set(hotspot[VR_Hover].ath,get(ath));set(hotspot[VR_Text].ath,get(ath)););
    set(hotspot[get(bldgname)].onout,tween(scale|hotspot[VR_Hover].alpha|hotspot[VR_Text].alpha,1|0|0);tween(hotspot[VR_Hover].scale,1,0.01););
    set(hotspot[get(bldgname)].onclick,openurl(get(bldgtour),_self););
    set(asd1,calc(asd1+30));
    );

    all hotspot should have different name, url and onclick, but onclick ended having the same string in all hotspot.

    thanks *smile*

    Yanward *squint*

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!