On click hide open button and show close button !

  • Hy...

    Can help me anybody?

    I want when i click on open button to show my menu... and display close button not again open button....

    This is my code !


    <plugin
    name="menu2"
    url="mask.png"
    keep="true"
    visible="true"
    enabled="true"
    handcursor="false"
    capture="false"
    zorder="1"
    alpha="1.00"
    blendmode="normal"
    smoothing="true"
    align="top"
    edge="centre"
    x="0" y="-50"
    ox="" oy="0"
    rotate="0"
    width="" height=""
    scale="1"
    scale9grid=""
    crop=""
    mask=""
    onloaded=""
    onover=""
    onhover=""
    onout=""
    ondown=""
    onup=""
    onclick=""
    />

    <plugin name="button_thumbs"
    url="thumbs_button3.png"
    visible="true"
    enabled="true"
    handcursor="true"
    capture="true"
    children="true"
    zorder="100"
    alpha="0.5"
    blendmode="normal"
    smoothing="true"
    align="centertop"
    edge="center"
    x="0" y="15"
    ox="0" oy="0"
    rotate="0"
    scale="1"
    width="200" height="40"
    scale9grid=""
    crop=""
    mask=""
    onloaded=""
    onover=""
    onhover="showtext(Open !,style10)"
    onout=""
    ondown=""
    onup=""
    onclick="action(open_map2));"
    />
    <plugin name="button_thumbs2"
    url="thumbs_button2.png"
    visible="true"
    enabled="true"
    handcursor="true"
    capture="true"
    children="true"
    zorder="100"
    alpha="0.5"
    blendmode="normal"
    smoothing="true"
    align="centertop"
    edge="center"
    x="0" y="15"
    ox="0" oy="0"
    rotate="0"
    scale="1"
    width="200" height="40"
    scale9grid=""
    crop=""
    mask=""
    onloaded=""
    onover=""
    onhover="showtext(Close!,style10)"
    onout=""
    ondown=""
    onup=""
    onclick="action(close_map2));"
    />

    <action name="close_map2">
    tween(plugin[menu2].oy,100,distance(700,3),linear);
    tween(plugin[menu2].alpha,1,distance(1,0.5),easeoutquart);
    tween(plugin[button_thumbs2].oy,100,distance(700,3),linear);
    set(plugin[button_thumbs2].onhover,showtext(Close!,style10));
    set(plugin[button_thumbs2].onclick,action(close_map2));
    </action>

    <action name="open_map2">
    set(plugin[menu2].visible,true);
    tween(plugin[menu2].oy,0,distance(700,3),linear);
    tween(plugin[menu2].alpha,1,distance(1,0.5),easeoutquart);
    tween(plugin[button_thumbs].oy,300,distance(700,3),linear);
    set(plugin[button_thumbs].onhover,showtext(Open !,style10));
    set(plugin[button_thumbs].onclick,action(open_map2));
    </action>
    </action></plugin></plugin></plugin>

Participate now!

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