Textfeld ein und ausblenden

  • hi,

    ich möchte ein textfeld über einen button ein und ausblenden, aber das ausblenden geht nicht?
    was mache ich da falsch? danke für eure hilfe!


    <plugin name="helpbutton" url="../../images/help.png"
    keep="true" visible="true" enabled="true" handcursor="true" capture="true" children="false" zorder="1"
    align="righttop" x="10" y="7"
    onclick="action(show_help_text);"
    onhover="showtext(Hilfe);"
    />

    <action name="show_help_text">
    set(plugin[help_text].visible,true);
    tween(plugin[help_text].alpha,1);
    </action>

    <action name="hide_help_text">
    tween(plugin[help_text].alpha,0,,,set(plugin[help_text].visible,false));
    set(plugin[helpbutton].onclick,action(hide_help_text));
    </action>

    <plugin name="help_text" url="../../files/textfield.swf"
    keep="true"
    visible="false" enabled="false" handcursor="true" capture="true" children="false"
    zorder="0"
    smoothing="true"
    origin="center"
    width="400" height="200"
    onclick="action(hide_help_text);"
    autosize="center"
    background="true"
    backgroundcolor="0xf4d100"
    css="p{color:#d10028; font-family:Verdana, Arial, Tahoma, San-Serif; font-size:11; margin-left:10; margin-right:10; }"
    bordercolor="0"
    borderwidth="0"
    glow="1"
    glowcolor="0xd10028"
    shadow="1"
    html="data:help_text_html"
    selectable="true"
    />
    <data name="help_text_html">
    <p><br /><b>Hilfe</b>
    <br /><br />Text,Text,Text,Text,Text,Text,Text.
    <br /><br /><b>Hilfe</b>
    <br /><br />Text,Text,Text,Text,Text,Text,Text.
    <br /><br /><b>Hilfe schließen</b></p><br /></data>

  • Hi,

    im "show_help_text" müsstest du auch das "onclick" Event des Buttons ändern
    damit der Text wieder ausgeblendet wird,
    z.b:

    Code
    <action name="show_help_text">
     set(plugin[help_text].visible,true);
       tween(plugin[help_text].alpha,1);
    set(plugin[helpbutton].onclick,action(hide_help_text));
     </action>

    und im "hide_help_text" wieder zurücksetzen:

    Code
    <action name="hide_help_text">
     tween(plugin[help_text].alpha,0,,,set(plugin[help_text].visible,false));
       set(plugin[helpbutton].onclick,action(show_help_text));
     </action>

    Schöne Grüße,
    Klaus

  • hallo klaus,

    danke für deine antwort. eine frage habe ich heute noch.
    ist es möglich auf einen button eine action zu legen wo ich z.b ein textfeld ein/ausblenden kann.
    kannst du mir mal ein bsp. zeigen. danke!

Participate now!

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