Setting cookies or similar?

  • I'd like to show a banner within a pano when someone first arrives - the usual "this is an interactive image" thing - but I'd also like to make sure that it isn't shown again once they've dismissed it, even when they look at a different pano in the site.

    If this was regular web page stuff I'd be poking some PHP into setting and getting cookies. Is there any way of achieving a similar result from within KRPano's XML? This isn't within a single tour, it is for any of a number of different panos on different pages within the same overall site.

    Keith

  • Hi,

    this could by done by javascript for example,
    call a javascript function from krpano that loads or save some settings,

    or pass a variable (with an dynamic value from php) on the flash embedding
    and check this variable in krpano,
    e.g.
    HTML:

    Code
    var so = SWFObject(....);
    so.addVariable("showbanner","yes");


    ...

    XML:

    Code
    <krpano onstart="if(showbanner == yes, action(show_a_banner) );">
    ...

    best regards,
    Klaus

  • Hi,

    Just like thatkeith, i would like to open an help box info within a pano when someone first arrives. I have 7 panos, each one stored in a xml file.
    I'd like to open this help box when someone arrives on the first pano, and avoid to open it in the others panos (and if the visitor come back on the first pano)....just like cookies

    So i tried what Klaus explained (by javascript), and it worked.
    But when i use Kprotect to embedd all my xml files in one swf file, it doesn't work anymore (the box is not showing).

    Can somebody explain me why this doesn't work anymore and if there's a way to fix it ?

    Thanks for your reply *smile*

    Edited once, last by MissZougou (February 22, 2010 at 2:16 PM).

  • Thanks a lot Klaus !

    I forgot to check the kprotect parameters...thanks again !
    I would have a another question for you, but it's about the combobox plugin, so i'll find another topic.

    Best regards
    MissZougou

Participate now!

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