Posts by alfabeta

    Hi Tuur, thanks for your help.

    It seems I wasn't clear.
    I want to allow users to move the pano (and the anchored hotspot, of course) when they hold click the hotspot image and move to any desired point or direction.

    That is not possible if they click on a hotspot and drag(move).
    Default hotspot cursor is pointer but I have changed to default to look the same as outside the hotspot.
    Thanks

    I've include the map style into the action.
    I tried all your suggestions but nothing changes: the map is loaded at the correct coords but radar and spot are absent.
    See that radar doesn't use any of the arguments and it isn't displayed.

    Some changes here, create both layers with the action

    Code
    <scene ... onstart="map_action(40,30,-50);">

    Here both layers are displayed but the child map a white rectangle

    Code
    <action name="ac1" scope="local" >    
        addlayer(s1); 
        set(layer[s1].type, container); 
        layer[s1].loadstyle(s1);
        addlayer(s2);
        set(layer[s2].parent, s1); 
        layer[s2].loadstyle(s2); 
    </action>

    Now it works. Lines order and set(layer[s2].parent, s1); instead of layer[s2].parent = s1;

    <style name="s1" bgcolor="0xFFFFFF" bgalpha="0.5" align="leftbottom" x="5" y="85" width="270" height="370"/>
    <style name="s2" width="100" height="100" bgcolor="0x228444" type="text" />

    In a scene this works okay:

    Code
    <layer name="s1" type="container" style="s1">
        <layer name="s2" style="s2" />
    </layer>

    I'm trying to do the same from an action: <scene ... onstart="ac1();" ... >

    Code
    <action name="ac1" scope="local" >
        addlayer(s1); 
        layer[s1].loadstyle(s1);
        set(layer[s1].type, container);  
        addlayer(s2);
        layer[s2].parent = s1; 
        layer[s2].loadstyle(s2); 
    </action>

    This only displays layer s1. What am I missing?
    Thank you

    The complete hotspot based on Popup examples

    Code
    <hotspot name="video3" style="infospot" 
            html="View..."
            ath="185" atv="0"
            onloaded="circlepos(5,6);"
            onclick.mobile="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', 355,200 false);"
            onclick.normal="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', 710,400 false);"
            scale="0.6"
            zoom="false" 
            distorted="false"        
    />

    or

    Code
    <hotspot name="video3" style="infospot" 
            html="View..."
            ath="185" atv="0"
            onloaded="circlepos(5,6);"
            onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...oplay=1', calc(device.mobile ? 355 : 710), calc(device.mobile ? 200 : 400), false);"                                
            scale="0.6"
            zoom="false" 
            distorted="false"        
    />

    Both output a black line.

    Testing with 2 hotspots same as previous with changes
    name="video1" device="!mobile"
    onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...play=1', 710, 400, false);"

    name="video2" device="mobile"
    onclick="popup('iframe', 'https://www.youtube.com/embed/wtql...play=1', 355, 200, false);"

    they work okay.

    I have a hotspot with this attribute

    onclick="popup('iframe', 'https://www.youtube.com/embed/wtql..., A, B, false"

    How can I simply set A and B according to user device?

    I know I can create an action with conditional mobile or not or create 2 almost identical hotspots, one with devices="!mobile" and the other with devices="mobile".

    Outside scenes I have these simplified code:

    The first layer must be visible in all scenes but the first one 'first_scene'.
    The second layer must be present in all scenes but in 'first_scene' it must change its position from x=70 to x=10.
    At bottom the action that onstart in 'first_scene'.
    I guess it is a keep and visible issue but I don't realize how to accomplish that. Thanks in advance.

    Code
    <layer name="logo0"
       type="image"
       url="logo0.png" 
       align="topleft" x="10" y="5" 
       selectable="false" 
       html=""
       visible="true"
       keep="true" 
       ...
    />
    Code
    <layer name="some_text"
       url="%swfpath%/plugins/textfield.swf" 
       keep="true"
       align="topleft" x="70" y="10" 
       html="blah blah hello"
       ...
    />
    Code
    <action name="hide_logo">
        set(layer[logo0].visible,false);
        set(layer[logo0].keep,??);
        set(layer[some_text].x,20);
    </action>
    Code
    <scene name="first_scene" onstart="hide_logo();"  ...>
       ...
    </scene>

    Thank you!

    I had edited my last post but the last add was not included.

    1) How to add a radar element <radar visible="true" size="350" alpha="0.33" fillcolor= ?

    2) Also <spot name="point1"  lat="...

    3) <layer name="map" style="map"
        lat="input 1" 
      lng="input 2" 
    ....
    ->
    set(layer['map'].'lat',%1);
    set(layer['map'].'lng',%2); ?

    Good, thanks.

    Starting

    Code
    <layer name="mapcontainer" style="mapcontainer">
                <layer name="map" style="map"
    Code
    <action name="map_rads">
        addlayer('mapcontainer');
        set(layer['mapcontainer'].style,mapcontainer);
        addlayer(layer['mapcontainer'].'map');
        set(layer['mapcontainer'].layer['map'].style,map);

    or

    Code
    <action name="map_rads">
        addlayer('mapcontainer',mpc);
        set(mpc.style,mapcontainer);
        addlayer(mpc.'map', MP);
        set(MP.style,map);

    Is that so?

    How to check the 'output' of the action?

    Having scenes like

    Code
    <scene ... >
       <layer name="alfa" attr1 ...  attr2...>
           <layer name="beta" attr3="%1" attr4="%2">
               <layer name="%3"  ...>
               </layer>
           </layer>
       </layer>
    </scene>

    where %1, %2 and %3 vary.
    I want to know how to group all layers in a 'function layers' containing layers code and simplify the code something like

    Code
    <scene ... >
       layers(A,B,C)
    </scene>

    Thanks