• Help me, please! How to make a floorplan in which there will be buttons. Has pressed the button "1st floor", and there was a plan of the first floor, has pressed "the second floor" and there was a plan of the second floor and etc. Help, please! It is urgently necessary to make. Best regards, Eugenio

  • Hi,

    you mean something like this: http://imaginefinland.fi/mikkeli/liikkeet/kauppakeskusakseli

    Click on the "NÄYTÄ POHJAKARTTA" button bottom center.

    Here is small example code to make this:

    You need to make graphic where the maps appear and whose parent the floor buttons are.

    zorder="0"
    align="center"
    edge="center"
    y="0" x="0"
    scale="1"
    height="heightofyourgraph"
    width="widthofyourgraph"
    children="true"
    scalechildren="true"
    handcursor="false"
    keep="true"

    url="napit/pohjatausta.png"
    visible="true"/>


    Then floormaps:


    <plugin name="3rdfloormap" zorder="2" parent="mapparent" alpha="0" align="center" edge="center" scale="1" y="0" x="0" handcursor="false" onclick="" customColor="true" keep="true" url="3rdfloormap.jpg" visible="false"/>

    <plugin name="2ndfloormap" zorder="3" parent="mapparent" alpha="1" align="center" edge="center" scale="1" y="0" x="0" handcursor="false" onclick="" customColor="true" keep="false" url="2ndfloormap.jpg" visible="false"/>

    <plugin name="1stfloormap" zorder="5" parent="mapparent" alpha="0" align="center" edge="center" scale="1" y="0" x="0" handcursor="false" onclick="" customColor="true" keep="false" url="1stfloormap.jpg" visible="true"/>
    Then the buttons to show different floormaps.


    <plugin name="3rdfloormapbutton" zorder="20" parent="mapparent" align="bottom" edge="center" y="-30" x="-20" handcursor="true" onover="set(zorder,21); tween(scale,1.3);" onout="tween(scale,1); set(zorder,20);" onclick="action(show3rdfloormap);" customColor="true" keep="false" url="urltoyourbuttonhere" visible="true"/>

    <plugin name="2ndfloormapbutton" zorder="20" parent="mapparent" align="bottom" edge="center" y="-30" x="162.5" handcursor="true" onover="set(zorder,21); tween(scale,1.3);" onout="tween(scale,1); set(zorder,20);" onclick="action(show2ndfloormap);" customColor="true" keep="false" url="urltoyourbuttonhere" visible="true"/>

    <plugin name="1stfloormapbutton" zorder="20" parent="mapparent" align="bottomright" edge="center" y="-30" x="90" handcursor="true" onover="set(zorder,21); tween(scale,1.3);" onout="tween(scale,1); set(zorder,20);" onclick="action(show1stfloormap);" customColor="true" keep="false" url="urltoyourbuttonhere" visible="true"/>
    And last actions for the floormap buttons.


    <action name="show3rdfloormap">
    set(plugin[2ndfloormap].alpha,0);
    set(plugin[2ndfloormap].visible,false);
    set(plugin[1stfloormap].alpha,0);
    set(plugin[1stfloormap].visible,false);
    set(plugin[3rdfloormap].visible,true);
    tween(plugin[3rdfloormap].alpha,1,0.3,easeInQuad);
    </action>

    <action name="show2ndfloormap">
    set(plugin[1stfloormap].alpha,0);
    set(plugin[1stfloormap].visible,false);
    set(plugin[3rdfloormap].alpha,0);
    set(plugin[3rdfloormap].visible,false);
    set(plugin[2ndfloormap].visible,true);
    tween(plugin[2ndfloormap].alpha,1,0.3,easeInQuad);
    </action>

    <action name="show1stfloormap">
    set(plugin[3rdfloormap].alpha,0);
    set(plugin[3rdfloormap].visible,false);
    set(plugin[2ndfloormap].alpha,0);
    set(plugin[2ndfloormap].visible,false);
    set(plugin[1stfloormap].visible,true);
    tween(plugin[1stfloormap].alpha,1,0.3,easeInQuad);
    </action>
    This is the structure i am using in my work. Im sure there are better ways to do it but this has been working for me so far. Hope it helps you!


    Regards

Participate now!

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