vtour thumbs bigger on iphone

  • hello,
    im quite new in changing my tours to be viewable on mobile devices...

    i use the thumbs template by klaus, and have this problem:
    the thumbs are too small on iphone, so i integrated

    Code
    altonloaded="if(isphone, mul(scale,2.4)); onloaded();"

    to the buildthumbs action.
    but the thumbs dont become bigger... (at least with the iphone simulator)

    here the whole action:

    did i miss something?

    here is the tour:

  • altonloaded="if(isphone, mul(scale,2.4)); onloaded();"

    should be

    set(plugin[get(thumbname)].altonloaded, if(isphone, mul(scale,2.4)));

    i think.

    actually i dont think it should be under the altonloaded it should be under the normal onloaded. alt only gets run on html5 so if you want larger thumbs for andriod the onloaded would be the correct one.

  • I do it by using the devices settings.

    This means that I have made a duplicate of all the actions used for the thumbs.
    One like this
    <action devices="desktop|tablet" name="buildthumbs">
    And one like this
    <action devices="mobile" name="buildthumbs">

    Same for the openthumb and openthumbs action and if needed also for closethumbs.

    This give me full control over how they perform on different media.

    Devices="mobile" also make it work on Android mobiles.

    Same on the startup action. If I want the mobile thumbs to be closed I use a duplicate with no opnethumbs

    Hans

  • hello vn, hello hans!

    thanks for your hints!

    i tried vns idea, it works! but of course the thumbs are overlapping now... i tried this:

    Code
    set(plugin[get(thumbname)].altonloaded, if(isphone, mul(scale, 1.6), mul(x, 1.6)));


    but that doesnt fix the overlap... must be something different...

    for the open/close buttons i have this:

    Code
    onloaded="IF(ishtml5, set(y, 8), set(x, 53)); IF(isphone, mul(scale, 1.6));"


    the first part corrects the alignment and works fine, but with the scaling part after it its gone...
    here is the screenshot:

  • the over lap is because the thumb open postions is controlled by another action. the openthumb action. adjusting the y settings should stop the over lap. i didnt test that but you can see the idea. IF desktop - set the thumbnails the default if not since you used used a scale of 1.6 make the y 150 or so. i sued stagewidth so the thumbs will go to the edge of the phone then start a second layer if needed.


    <action name="openthumb">
    if(%2 != NEXT,
    set(pos,0);
    copy(curpos, plugin[%1].thumbpos);
    set(xdst, 0);
    IF(isdesktop, set(ydst, 90), set(ydst,150));
    );

    if(pos LT curpos,
    inc(pos);
    IF(isdesktop, inc(ydst,90), inc(ydst,150));
    IF(isdesktop, set(ymax, 200), set(ymax, get(stagewidth));
    if(ydst GT ymax, inc(xdst,90);set(ydst,0); );
    openthumb(%1,NEXT);
    ,
    add(xdst,10);
    add(ydst,10);
    tween(plugin[%1].x, get(xdst) );
    tween(plugin[%1].y, get(ydst) );
    tween(plugin[%1].width, 80);
    tween(plugin[%1].height, 80);
    );
    </action>

    otherwise what i do is to use the thumbnail for desktops only. set the device tags on the actions to only work on desktops. then use a combobox which is set to only display on phones and tablets and use a combobox drop down menu that autofills itself based on the scenes for mobile devices.

    <action name="buildthumbs" devices="desktop">
    </action>

    <plugin name="cb" keep="true" devices="ipod|ipad|iphone|andriod"
    url="plugins/combobox.swf"
    alturl="plugins/combobox.js"
    align="topcenter" x="0" y="0"
    onloaded="fillbox();" zorder="15"
    />

    <action name="fillbox">
    if(scene.count == 1, set(plugin[cb].visible,false));
    for(set(i,0), i LT scene.count, inc(i),
    set(scenename, get(scene[get(i)].name));
    set(titlename, get(scene[get(i)].title));
    txtadd(itemaction, 'loadscene(', get(scenename),',null,MERGE,BLEND(1));');
    plugin[cb].additem(get(titlename), get(itemaction));
    );
    </action>

  • Yes thats why I use it my way. You get control of every part of the thumbs.

    Hans

  • hello, hans, hello vn!

    yes, you are right, building 3 optimised versions give an perfect GUI...
    but it makes the code very complex...

    after thinking about GUI in general, it should be less overloaded on iphone...

    i think, vn is right: no thumbs on the iphone... *whistling*

    so i didnt take the code by vn (thanks for it) , but tried to integrate a combobox for iphone only.

    i took the code of klaus`s example and the snippet by vn... and dont know why it doesnt work... *confused*

    the code is the following:


    maybe i misunderstood the whole thing... *sad*

    [EDIT]

    the first scene has this:

Participate now!

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