Demo Tour Wine Cellar Example Query

  • In the wine cellar demo example we have pictures on the wall that pop off when clicked. Brilliant love it.

    How is it best to put buttons on top of these pictures to do different events when clicked.

    I have been experimenting trying to work out how to introduce plugin name into the code in order that I can then write another plugin which could then use the parent attribute but I am too much of a beginner. Learnt some stuff but not enough and unsure whether that is the best way. Still want the rest of the image clickable to return, but just want a button on the picture to link to a url.

    Help appreciated.

    regards Steve

  • This is where I have got to so far

    The hotspot is created with the code

    <action name="showpic">
    <!-- creates a new hotspot and fly it out -->
    if(hotspot[get(pic)] === null,
    txtadd(picfilename,'%CURRENTXML%/graphics/',get(pic),'.png');
    addhotspot(get(pic));
    getcenter(hsath,hsatv);
    copy(hotspot[get(pic)].ath, hsath);
    copy(hotspot[get(pic)].atv, hsatv);
    set(hotspot[get(pic)].visible,false);
    set(hotspot[get(pic)].distorted,true);
    set(hotspot[get(pic)].zorder,2);
    set(hotspot[get(pic)].scale,0.1);
    set(hotspot[get(pic)].alpha,0.0);
    set(hotspot[get(pic)].onloaded, flyin(get(name)) );
    set(hotspot[get(pic)].onclick, flyout(get(name)) );
    copy(hotspot[get(pic)].url,picfilename);
    ,
    flyin(get(pic));
    );
    </action>

    I am then wondering whether to add this to the above

    set(hotspot[get(pic)].name);

    to define the name of the hotspot to then refer to it to create a button on the image including the parent tag

    I can get the button to appear but it appears independent of the image so I think the parent name isn't woking as I want or the name isn't defined so the parent="xxx" can do its stuff *confused*

    I'm learning loads as I go but not quite enough *sad*

Participate now!

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