How to add a 3rd Party Plugin for automatically changing Billboard Ads?

  • Hi Room, Hallo Klaus,

    I would like to add the Billboard plugin from http://wirestam.com/panos/Flash/plugins/billboard.html into my VTour.
    That plugin is originally for use with FPP but i hope that its somehow possible to get it work with krpano as well. :)

    At the end it should somehow look like this http://wirestam.com/panos/Flash/billboard/adstest.html or http://wirestam.com/panos/Flash/billboard/adstest2.html

    Hope you guys can help me out here! :)

    Thx in advanced

    Cheers

    cHaiNa :)

  • This can be done with krpano code alone.

    Basicly you create a 1x1 png (black) That will be our mask.

    <hotspot url="spacer.png" name="mask" width="300" ath="0" atv="0" height="150" keep="true" distorted="true" rx="0.0" ry="0.0" rz="0.0" />
    you need to find the coordinates and the correct rotation (rx ry rz)

    next you make a hotspot with the image in it, and make that mask the parent.
    <hotspot name="s1" =url="slide_1".png" parent="hotspot[mask]" />
    <hotspot name="s2" =url="slide_2".png" parent="hotspot[mask]" alpha="0" />

    you then create an action that starts onxmlcomplete, that will rotate the spots

    something like

    <action name="slide">
    if(%1 === null, set(%1, 0)); <!-- 1 is the first slide -->
    if(%1 != 0, tween(hotspot[s%1].alpha, 0)); <!-- fade out old hotspot -->
    if(%1 GT 2, set(%1, 1)); <!-- 2 = the max number of slides -->
    delayedcall(6,
    tween(hotspot[s%1].alpha, 1, 0.5, , inc(%1); slide(%1)); <!-- fade in the slide, when its done, increase the next slide, and slide again after 6 sec.
    );
    </action>

    Its probally full of errors. But hopefull you catch the drift.

  • Hi Zephyr,

    thanks for the quick response and the suggestions. I've tried it out, but as you can see here: http://global-solidor.com/krpano/tour.html, i am not so good with coding so here is what i got as a result. :) - I guess the mask part worked, but the action part didnt.


    Here's the code for the mask:


    <hotspot name="mask"
    url="spacer.png"
    width="300" height="150"
    ath="0"
    atv="0"
    keep="true"
    distorted="true"
    rx="0.5"
    ry="0.6"
    rz="0.0"
    />

    <hotspot name="s1"
    url="slide1.png" parent="hotspot[mask]"
    />


    <hotspot name="s2"
    url="slide2.png" parent="hotspot[mask]" alpha="0"
    />


    Followed by the code for the action:


    <action name="slide">
    if(%1 === null, set(%1, 0));
    if(%1 != 0, tween(hotspot[s%1].alpha, 0));
    if(%1 GT 2, set(%1, 1));
    delayedcall(6, tween(hotspot[s%1].alpha, 1, 0.5, , inc(%1); slide(%1));
    </action>

    I am sorry but it seems that i just dont catch the drift as you said! ;)
    I hope you can help me out with that!

    Much appreciated! :)

    Cheers

    cHaiNa :)

  • hmm did you add

    <events onxmlcomplete="slide()" />

    ow btw, the mask doesnt have to black. but it helps positioning, you can make it transparent when its done (a tranparent png, not setting alpha to 0, since that will set the children to alpha 0 to).

Participate now!

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