Posts by tuursw

    Okay I've solved the problem with Tuur his hint :)
    I am building my $initvar array in PHP dynamically

    Code
    $initvar = [
        'label_to_translate_1' => 'Eerste label in het Nederlands',
        'label_to_translate_2' => 'Tweede label in het Nederlands',
        'label_to_translate_3' => 'Derde label in het Nederlands',
    ];


    the passing it with a json_encoded array to the pano
    and in the pano

    Code
    onhover="showtext(calc($label_to_translate_1));"


    that's it, that's all!

    I am building an application that is available in 2 languages, the pano contains several scenes and within each scene there are a lot of hotspots...
    When the visitors hovers over a hotspot I want to show a label in the current language, all the labels are defined in the database... so passing it with an invitvars seems to more logical option to me... the language selection is happening in the webpage.

    This is de script to call the pano

    Code
    embedpano({swf:"/pano_1/pano.swf", xml:"/pano_1/pano.xml", target:"pano", html5:"auto", mobilescale:1.0, consolelog:true, initvars:{"company_logo":"\/assets\/company\/1\/Aantekening_2020-07-10_101615.png","creditor_url":"\/product\/creditor\/2488\/668","newproducts_url":"\/product\/new\/2488\/668","promotions_url":"\/product\/promotions\/2488\/668","downloads_url":"\/downloads\/1","company_url":"\/company\/info\/1","booth_image_1":"\/assets\/booths\/668\/Conway_logo_3.jpg","booth_image_2":"\/assets\/booths\/668\/Death_to_stock_Kashmir_Big_Cartel_7.jpg","booth_image_3":"\/assets\/booths\/668\/Conway_gesprek_klant.JPG","booth_image_4":"\/assets\/booths\/668\/DeathtoStock_Clementine1.jpg"}, passQueryParameters:true});

    or the second pano...

    Code
    embedpano({swf:"/pano_2/pano.swf", xml:"/pano_2/pano.xml", target:"pano", html5:"auto", mobilescale:1.0, consolelog:true, initvars:{"company_logo":"\/assets\/company\/1\/Aantekening_2020-07-10_101615.png","creditor_url":"\/product\/creditor\/2488\/668","newproducts_url":"\/product\/new\/2488\/668","promotions_url":"\/product\/promotions\/2488\/668","downloads_url":"\/downloads\/1","company_url":"\/company\/info\/1","booth_image_1":"\/assets\/booths\/668\/Conway_logo_3.jpg","booth_image_2":"\/assets\/booths\/668\/Death_to_stock_Kashmir_Big_Cartel_7.jpg","booth_image_3":"\/assets\/booths\/668\/Conway_gesprek_klant.JPG","booth_image_4":"\/assets\/booths\/668\/DeathtoStock_Clementine1.jpg"}, passQueryParameters:true});



    I have some hotspots defined in an external xml file...

    Code
    <include url="hotspots.xml" />


    and inside the external xml there are some of the initvars...

    Code
    <hotspot name="action_cart"							style=""						 	url="../buttons/cart.png"							 if="creditor_url"							onclick="popup('iframe', calc(creditor_url), 1400, 600, true);"							width="40"							height="40"						 	ath="46.129439979033464" atv="10.758831964056416" scale="1" rx="0" ry="0" rz="0" />		<hotspot name="action_eye"							style=""						 	url="../buttons/eye.png"							 if="newproducts_url"							onclick="popup('iframe', calc(newproducts_url), 1400, 600, true);"							width="40"							height="40"						 	ath="-25.06691851111168" atv="9.089397234949919" scale="1" rx="0" ry="0" rz="0" />			<hotspot name="action_star"							style=""						 	url="../buttons/star.png"							 if="promotions_url"							onclick="popup('iframe', calc(company_url), 1400, 600, true);"							width="40"							height="40"						 	ath="2" atv="5" scale="1" rx="0" ry="0" rz="0" />

    I have several pano's which have the same hotspots, so I want to include an XML with the all those hotspots into my different pano's (that works fine)

    The hotspots images are passed with initvars... how can I pass my initvars to that included xml?

    I have 5 hotspots defined in my pano which take their url from the initvars (1 parameter for each hotspot)

    Code
    initvars:{hotspot_1:"link_to_page_1",hotspot_2:"link_to_page_2",hotspot_3:"link_to_page_3",hotspot_4:"link_to_page_4",hotspot_5:"link_to_page_5"}


    Sometimes I only need to show 3 of the 5 hotspots, so I will only pass 3 initvars instead of 5.

    How can I check in the XML to show or hide the hotspots?

    Hey,

    I need to load an iframe with a dynamic url when clicking a hotspot, I have already found out how to pass initvars to my pano and this is working fine but I can't seem to get the initvars into my dynamic url...

    I am starting from this example and using the iframe to load dynamic content:
    https://krpano.com/releases/1.20.…tml5=only+webgl


    Basically I need to load the page /products/customer/<customer_id>


    My hotspot code is

    Code
    <hotspot name="basket" style="skin_infostyle"			html="Web"			ath="32" atv="23.5"			url="/assets/booths/products.jpg"			onclick="popup('iframe', '/products/customer/%$customer_id%', 1400, 600, true);"			/>


    But it doesn't seem to work this way... anyone knows a way to get this working?