You are not logged in.

1

Monday, October 29th 2012, 2:06pm

new droplet makevtour - ios only 2 thumbs shown

hallo,
on ipad as well as on iphone only 2 thumbs (and scenes) are shown...
Tour
If I delete these 2 scenes, an error is thrown: loadscene() - scene "null" not found....

This post has been edited 1 times, last edit by "wishbone" (Oct 29th 2012, 3:52pm)


2

Monday, October 29th 2012, 4:24pm

ok it seems to be a problem of not supported flat partial panos..I added static images as scene img. If I would use plugins instead, the images couldn't be zoomed in.
Deleting the flat pano scenes doesn't work, the viewer is looking for the missing scenes - where are they referred to?
Would be important to know once a new scene has to be added...

how could I make the html viewer omit certain scenes (ie the flat ones)?

This post has been edited 1 times, last edit by "wishbone" (Oct 29th 2012, 4:37pm)


3

Tuesday, October 30th 2012, 9:48am

Hi,

right, the not supported scenes are 'masked-out' for html5 by the devices="flash" setting at the <scene> elements.

For manually using static images instead, try that:
  1. remove the devices="flash" from the <scene> elements
  2. add devices="flash" to the <image> and <preview> elements inside the <scene>
  3. add the static image with devices="html5" inside the <scene>,
    e.g. maybe this way:

    Source code

    1
    
    <layer name="staticimage" url="flatpano1.jpg" height="100%" width="prop" enabled="false" zorder="0" devices="html5" />
Best regards,
Klaus

4

Tuesday, October 30th 2012, 9:51am

oh, great!!!!!!!!!
thx a lot...

5

Tuesday, October 30th 2012, 10:22am

Now I would need an orientation detection to make the image always fill the whole screen; eg fieldofviews orientation plugin.
Means, I would have to set a pair of layers for each static image:
<plugin name="image1-portrait" heigth="100%" width="prop" ... >
<plugin name="image1-landscape" width="100%" height="prop" ...>
and use this script from Aldo:

Source code

1
2
3
4
5
6
7
8
9
10
11
	<action name="updateorientation">
		if(isHTML5,
			copy(plugin[image1-landscape].visible, plugin[orientation].landscape);
			copy(plugin[image1-portrait].visible, plugin[orientation].portrait);
			trace(get(plugin[orientation].orientation));
		,
			set(plugin[unknown-ui].visible, true);
			copy(plugin[image1-landscape].visible, false);
			copy(plugin[image1-portrait].visible, false);			
		);
	</action>

and set some variables (which I can't...) to go through the array of image-plugins, right?
No "cheaper" solution?

6

Tuesday, October 30th 2012, 10:42am

Hi,

do you mean to allow seeing always the full image fit inside the window, regardless from image size and orientation?

there would be a better solution - dynamically resize the image depending on the screen and on the image size:
e.g.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<layer name="bg" url="image.jpg" align="center" enabled="false" onloaded="bg_automatic_fit_inside()" />

<events name="bg_scale" onresize="bg_automatic_fit_inside();" />

<action name="bg_automatic_fit_inside">
    if(layer[bg].loaded,
        div(screenaspect, stagewidth, stageheight);
        div(imageaspect, layer[bg].imagewidth, layer[bg].imageheight);
        if(imageaspect GT screenaspect,
            set(layer[bg].width,100%); set(layer[bg].height,prop);
          ,
            set(layer[bg].width,prop); set(layer[bg].height,100%);
         );
      );
</action>


Best regards,
Klaus

7

Tuesday, October 30th 2012, 11:23am

das ist super, danke!
only, with more than one image it doesn't work properly. There are two images now. Startet in portrait mode, everything works fine. Started in landscape mode, portrait image doesn't fit...
also, zorder doesn't work (thumbs and map in background)

could I use the same layer name more than once?

9

Tuesday, October 30th 2012, 1:06pm

Hi,

use the second example, not the first one with the 'staticimage',

here step by step:
  1. edit the vtourskin.xml and add zorder="1" to the 'skin_scroll_window' element

  2. edit the tour.xml and add this action anywhere outside the scenes:

    Source code

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    
    <action name="automatic_fit_inside">
        if(layer[%1].loaded,
            div(screenaspect, stagewidth, stageheight);
            div(imageaspect, layer[%1].imagewidth, layer[%1].imageheight);
            if(imageaspect GT screenaspect,
                set(layer[%1].width,100%); set(layer[%1].height,prop);
              ,
                set(layer[%1].width,prop); set(layer[%1].height,100%);
             );
          );
    </action>


  3. then add inside each scene these two elements - the image and the event for resizing:

    Source code

    1
    2
    
    <layer name="bg" url="image.jpg" align="center" enabled="false" zorder="0" onloaded="automatic_fit_inside(bg);" devices="html5" />
    <events name="bg" onresize="automatic_fit_inside(bg);" devices="html5" />


Best regards,
Klaus

10

Tuesday, October 30th 2012, 1:51pm

ahh... you made my day...
only it must be: if screenaspect GT 1
and we don't need the image aspect, because if let's say screenaspect is 4:2 and imageaspect 4:3 it would render to width=100% - which results in free space above and below...

the zorder still doesn't work...

11

Tuesday, October 30th 2012, 2:01pm

the zorder still doesn't work...
look into the vtourksin.xml - there is at top the declaration of the 'skin_scroll_window' element - there add zorder="1",

e.g. here:

Source code

1
2
3
<!-- Skin Layout -->

<layer name="skin_scroll_window" type="container" keep="true" align="leftbottom" width="100%" height="100%" x="0" y="60" y_opened="60" y_closed="-2" maskchildren="true">

12

Tuesday, October 30th 2012, 2:16pm

works!!!!!! I'm happy...
(I had put the zorder to the Mobile section...)

Now I think this is quite a good compromise until html5 support for flat panos is ready!

thank you