problems in my tour

  • Hello friends , I have two problems , please help me .

    1 - How do I select all my hostport the same time? for example I want to set the size of all hostport my tour with a unique code .

    2 - if(device === mobile , set(hotspot[spot1].width,100) );
    if(device === mobile , set(hotspot[spot1].height,100) );

    Why this code is not catching ? I've tried so .

    if(devices === mobile , set(hotspot[spot1].width,100) );
    if(devices === mobile , set(hotspot[spot1].height,100) );

  • 1) Make a loop

    Code
    for( set(counter, 0), counter LT hotspot.count, inc(counter),
        if(device.mobile,
    	set(hotspot[get(counter)].width,100);
    	set(hotspot[get(counter)].height,100);
      );
    );


    2)

    Code
    if(device.mobile, ...
  • Tried So , is something wrong? pq not get caught.

    Code
    if(device.desktop , 
    
    
     set(counter, 0), counter LT hotspot.count, inc(counter),
        if(device.mobile,
    	set(hotspot[get(counter)].width,200);
    	set(hotspot[get(counter)].height,200);
      );
  • Hi,

    when you have a - if(device.deskop, ... - around the whole code, then this will be never executed on mobiles ;-).

    Btw - there might be also a simpler solution - set the mobile size statically in the xml using the device checks for attributes - e.g.

    Code
    <hotspot ...
             width.normal="200"
             width.mobile="100"
             ...
             />


    Note - the 'normal' device is new to the 1.19 version and the same like 'desktop or tablet'. For older versions use 'no-mobile' instead.

    Best regards,
    Klaus

Participate now!

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