Hi, I'm trying to build a responsive thumbnails menu in a scrollarea plugin.
I have 2 "colons" of thumbnails and want the both thumbnails to fill the screen width.
I divide the stagewidth by the 2 thumbnails width and scale the scrollarea container with the result and scalechildren="true", and then divide 100 by the result to setup the width and height of the container to fill the screen...
Unfortunatly it's not working as wanted...
On portrait mode I can't scroll to the end of the thumbnails list, and in landscape I can scroll too much...
I'm sure I'm not taking the problme the right way but don't see how I could achieve this in another way only with krpano..
Here is the code :
<events name="fitmyscroll" onresize="setmyscale()"
<layer name="mobilethumbs" keep="true" type="container" align="top" width="100%" height="100%" visible="false" bgcolor="0x000000" bgalpha="0.5" devices="mobile" y="60" scalechildren="true" onloaded="setmyscale()">
<layer name="scrollareamobile" url="%SWFPATH%/plugins/scrollarea.js" align="top" width="100%" height="3150" direction="v">
<layer name="intro" style="thumbs_left" y="150"/>
<layer name="AIR_LAKEVIEW" url="%SWFPATH%/skin/thumbs/AIR_LAKEVIEW.jpg" style="thumbs_left" tooltip="MAIN VIEW" y="150" onclick="hit(); loadpano(air_lakeview.xml, null, MERGE, BLEND(1))"/>
<layer name="AIR_SPORTS" url="%SWFPATH%/skin/thumbs/AIR_SPORTS.jpg" style="thumbs_right" tooltip="SPORTS AERIAL" y="150" onclick="hit(); loadpano(air_sports.xml, null, MERGE, BLEND(1))"/>
<layer name="WATERFRONT" url="%SWFPATH%/skin/thumbs/WATERFRONT.jpg" style="thumbs_left" tooltip="WATERFRONT" y="400" onclick="hit(); loadpano(waterfront.xml, null, MERGE, BLEND(1))"/>
<layer name="AIR_WATERFRONT" url="%SWFPATH%/skin/thumbs/AIR_WATERFRONT.jpg" style="thumbs_right" tooltip="WATERFRONT AERIAL" y="400" onclick="hit(); loadpano(air_waterfront.xml, null, MERGE, BLEND(1))"/>
<layer name="ADVENTURE" url="%SWFPATH%/skin/thumbs/ADVENTURE.jpg" style="thumbs_left" tooltip="ROPES COURSE" y="650" onclick="hit(); loadpano(adventure.xml, null, MERGE, BLEND(1))"/>
<layer name="ART" url="%SWFPATH%/skin/thumbs/ART.jpg" style="thumbs_right" tooltip="ARTS AND CRAFTS" y="650" onclick="hit(); loadpano(art.xml, null, MERGE, BLEND(1))"/>
<layer name="BASKETBALL" url="%SWFPATH%/skin/thumbs/BASKETBALL.jpg" style="thumbs_left" tooltip="SPORTS GYM" y="900" onclick="hit(); loadpano(basketball.xml, null, MERGE, BLEND(1))"/>
<layer name="BOAT" url="%SWFPATH%/skin/thumbs/BOAT.jpg" style="thumbs_right" tooltip="WATERSKIING" y="900" onclick="hit(); loadpano(boat.xml, null, MERGE, BLEND(1))"/>
<layer name="BOYS_EXTERIOR" url="%SWFPATH%/skin/thumbs/BOYS_EXTERIOR.jpg" style="thumbs_left" tooltip="BOYS CAMPUS" y="1150" onclick="hit(); loadpano(boys_exterior.xml, null, MERGE, BLEND(1))"/>
<layer name="CIRCUS" url="%SWFPATH%/skin/thumbs/CIRCUS.jpg" style="thumbs_right" tooltip="CIRCUS" y="1150" onclick="hit(); loadpano(circus.xml, null, MERGE, BLEND(1))"/>
<layer name="CLIMBING" url="%SWFPATH%/skin/thumbs/CLIMBING.jpg" style="thumbs_left" tooltip="CLIMBING WALL" y="1400" onclick="hit(); loadpano(climbing.xml, null, MERGE, BLEND(1))"/>
<layer name="DANCE" url="%SWFPATH%/skin/thumbs/DANCE.jpg" style="thumbs_right" tooltip="DANCE" y="1400" onclick="hit(); loadpano(dance.xml, null, MERGE, BLEND(1))"/>
<layer name="DINING_HALL" url="%SWFPATH%/skin/thumbs/DINING_HALL.jpg" style="thumbs_left" tooltip="DINING HALL" y="1650" onclick="hit(); loadpano(dining_hall.xml, null, MERGE, BLEND(1))"/>
<layer name="DRAMA" url="%SWFPATH%/skin/thumbs/DRAMA.jpg" style="thumbs_right" tooltip="THEATER" y="1650" onclick="hit(); loadpano(drama.xml, null, MERGE, BLEND(1))"/>
<layer name="GIRLS_BUNK" url="%SWFPATH%/skin/thumbs/GIRLS_BUNK.jpg" style="thumbs_left" tooltip="BUNK INTERIOR" y="1900" onclick="hit(); loadpano(girls_bunk.xml, null, MERGE, BLEND(1))"/>
<layer name="GIRLS_EXTERIOR" url="%SWFPATH%/skin/thumbs/GIRLS_EXTERIOR.jpg" style="thumbs_right" tooltip="GIRLS CAMPUS" y="1900" onclick="hit(); loadpano(girls_exterior.xml, null, MERGE, BLEND(1))"/>
<layer name="GYMNASTICS" url="%SWFPATH%/skin/thumbs/GYMNASTICS.jpg" style="thumbs_left" tooltip="GYMNASTICS" y="2150" onclick="hit(); loadpano(gymnastics.xml, null, MERGE, BLEND(1))"/>
<layer name="HOCKEY" url="%SWFPATH%/skin/thumbs/HOCKEY.jpg" style="thumbs_right" tooltip="HOCKEY" y="2150" onclick="hit(); loadpano(hockey.xml, null, MERGE, BLEND(1))"/>
<layer name="HORSEBARN_INTERIOR" url="%SWFPATH%/skin/thumbs/HORSEBARN_INTERIOR.jpg" style="thumbs_left" tooltip="HORSE BARN INTERIOR" y="2400" onclick="hit(); loadpano(horsebarn_interior.xml, null, MERGE, BLEND(1))"/>
<layer name="MAGIC" url="%SWFPATH%/skin/thumbs/MAGIC.jpg" style="thumbs_right" tooltip="MAGIC" y="2400" onclick="hit(); loadpano(magic.xml, null, MERGE, BLEND(1))"/>
<layer name="ROCKBAND" url="%SWFPATH%/skin/thumbs/ROCKBAND.jpg" style="thumbs_left" tooltip="ROCK SHOP" y="2650" onclick="hit(); loadpano(rockband.xml, null, MERGE, BLEND(1))"/>
<layer name="SKATEPARK" url="%SWFPATH%/skin/thumbs/SKATEPARK.jpg" style="thumbs_right" tooltip="SKATE PARK" y="2650" onclick="hit(); loadpano(skatepark.xml, null, MERGE, BLEND(1))"/>
<layer name="SWIMMING_POOL" url="%SWFPATH%/skin/thumbs/SWIMMING_POOL.jpg" style="thumbs_left" tooltip="SWIMMING POOL" y="2900" onclick="hit(); loadpano(swimming_pool.xml, null, MERGE, BLEND(1))"/>
<layer name="TENNIS" url="%SWFPATH%/skin/thumbs/TENNIS.jpg" style="thumbs_right" tooltip="TENNIS" y="2900" onclick="hit(); loadpano(tennis.xml, null, MERGE, BLEND(1))"/>
<layer name="select_mobilepano" url="%SWFPATH%/skin/icons/select_pano.png" zorder="20" devices="mobile" width="360" height="240"/>
</layer>
</layer>
<action name="setmyscale">
div(mobilethumbscale,stagewidth,750);
set(layer[mobilethumbs].scale,get(mobilethumbscale));
div(msw,100,get(mobilethumbscale));
div(msh,100,get(mobilethumbscale));
txtadd(myscrollwidth,get(msw),'%');
txtadd(myscrollheight,get(msh),'%');
set(layer[mobilethumbs].width,get(myscrollwidth));
set(layer[mobilethumbs].height,get(myscrollheight));
</action>
<style name="thumbs_left" align="top" edge="right" x="-5" devices="mobile" width="360" height="240"/>
<style name="thumbs_right" align="top" edge="left" x="5" devices="mobile" width="360" height="240"/>
Display More
and you can see the result here ( try with a mobile as it's only a mobile menu ;) : http://www.covecreekproductions.com/tours/island_l…?pano=drama.xml
and clic on the bottomleft button