scrolltextfeld durch button ein- und ausblenden - geht nicht :-(

  • blank_pagehallo,

    ich bin neu hier undprobieren des textfeldes mit scroller aus den neuen
    examples gerade aus.
    ich möchte das textfeld aber erst über einen infobutton einblenden, bzw. durch einen weiteren klick ausblenden lassen.
    kann mir jemand auf die sprünge helfen, damit das ganze erst ausgeblendet ist und nur durch klick erscheint?
    das ist mein momentaner verunglückter versuch:

    <plugin name="nav_info" url="images/b_info.png" keep="true"
    zorder="2" origin="rightbottom" x="240" y="-70"
    onhover="showtext(Hilfe);" onover="set(blendmode,add);"
    onout="set(blendmode,normal);" onclick="action(showDialog,textbox);" />


    <action name="show_textbox">
    set(plugin[textbox].visible,true);
    tween(plugin[textbox].alpha,1);
    set(plugin[button].onclick,action(hide_textbox));
    </action>

    <action name="hide_textbox">
    tween(plugin[textbox].alpha,0,,,set(plugin[textbox].visible,false));
    set(plugin[button].onclick,action(show_textbox));
    </action>


    <!-- textfeld mit scroller -->

    <!-- scale9grid scaled textbox image -->
    <plugin name="textbox"
    url="images/textfield.png"
    align="leftbottom" x="10"
    y="10"
    scale9grid="5|5|12|55"
    width="280"

    height="200"
    />

    <!-- the textfield itself -->
    <plugin name="text"
    url="../plugins/textfield.swf"
    keep="true" visible="false" enabled="false" handcursor="true" capture="true" children="false"

    zorder="0" smoothing="true"

    parent="textbox"

    align="lefttop" x="10" y="10"
    background="false"
    borderwidth="0"
    html="data:testtext"

    css="p{color:#000000; font-family:Arial; font-size:12;}"

    autosize="left"
    mask="textmask"
    />

    <!-- textfield mask to maskout hidden/out-scrolled text
    -->
    <plugin name="textmask" url="images/box.png"

    parent="textbox"
    align="lefttop"
    x="5"
    width="255"
    y="5" height="190"
    />

    <!-- buttons for textscrolling - just move the textfield up and down
    -->
    <plugin name="scrollup" url="images/dirbutton.png"

    parent="textbox"
    align="righttop"
    x="24"

    y="5"
    rotate="-90"
    crop="0|0|19|19"
    onovercrop="0|19|19|19" ondowncrop="0|38|19|19"

    ondown="tween(plugin[text].y, 10, distance(400,0.7), linear);"

    onup="stoptween(plugin[text].y);"
    />

    <plugin name="scrolldown" url="images/dirbutton.png"

    parent="textbox"
    align="rightbottom"
    x="24"

    y="5"
    rotate="+90"
    crop="0|0|19|19"
    onovercrop="0|19|19|19" ondowncrop="0|38|19|19"

    ondown="tween(plugin[text].y, -265, distance(400,0.7), linear);"

    onup="stoptween(plugin[text].y);"
    />

    <!-- testtext -->
    <data
    name="testtext">
    <p>
    test text test text test text test text
    test<br/>
    text test text test text test text<br/>
    test
    text test text test text test text test text<br/>
    test text test text
    test text<br/>
    test text test text test text test text test text
    test<br/>
    text test text test text<br/>
    test text test
    text test text test text test<br/>
    text test text test text test
    text<br/>
    test text test text test text test text
    test<br/>
    <br/>
    text test text test text test
    text<br/>
    test text test text test text test text
    test<br/>
    text test text test text test text<br/>
    test
    text test text test text test text test<br/>
    text test text test text
    test text test text<br/>
    test text test text test text test text test
    text test<br/>
    text test text<br/>
    test text test text
    test text test text test text<br/>
    test text test text test text test
    text test<br/>
    text test text test text test text test
    text<br/>
    test text test text<br/>
    <br/>
    test
    text test text test text<br/>
    <br/>
    test text test text
    test<br/>
    text test text test
    <br/>
    text
    test<br/>
    text test text test text test<br/>
    text test
    text<br/>
    test text test text test
    text<br/>
    </p>
    </data>

  • hallo,
    durch ausschlußverfahren bin ich jetzt soweit, dass sich das scrolltextfeld durch klick auf den button einblendet und im textfeld habe ich einen link zum ausblenden.

    letztes problem *rolleyes*

    wenn sich das pano lädt, soll das textfeld nicht erscheinen - wie mach ich das?!?!


    <plugin name="nav_info" url="images/b_info.png" keep="true" zorder="2" origin="rightbottom" x="240" y="-70" onhover="showtext(Hilfe);" onover="set(blendmode,add);" onout="set(blendmode,normal);" onclick="action(show_textbox_field);" />


    <action name="show_textbox_field">
    set(plugin[button].enabled,false);
    set(plugin[textbox].y,-1500);
    tween(plugin[button].alpha,0,,,set(plugin[button].visible,false));
    tween(plugin[textbox].alpha,1,0);
    tween(plugin[textbox].textblur,0,0);
    tween(plugin[textbox].blur,0,0);
    set(plugin[textbox].visible,true);
    set(plugin[textbox].enabled,true);
    tween(plugin[textbox].y,0);
    </action>

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

    <action name="move">
    plugin[%1].changeorigin(lefttop,lefttop);
    tween(plugin[%1].x,0,1,easeoutquad);
    tween(plugin[%1].y,0,1,easeoutquad,action(move2,%1));
    </action>

    <action name="move2">
    plugin[%1].changeorigin(rightbottom,rightbottom);
    tween(plugin[%1].x,0,1,easeoutquad);
    tween(plugin[%1].y,0,1,easeoutquad,action(moveback,%1));
    </action>

    <action name="moveback">
    plugin[%1].changeorigin(center,center);
    tween(plugin[%1].x,0,1,easeoutquad);
    tween(plugin[%1].y,0,1,easeoutquad);
    </action>

    <action name="hidewindow">
    set(plugin[%1].enabled,false);
    tween(plugin[%1].alpha,0);
    tween(plugin[%1].blur,20);
    tween(plugin[%1].textblur,20,,,set(plugin[%1].visible,false));
    </action>


    <!-- scale9grid scaled textbox image -->
    <plugin name="textbox" url="images/textfield.png"
    align="leftbottom" x="10" y="10"
    scale9grid="5|5|12|55"
    width="280"
    height="200"
    />

    <!-- the textfield itself -->
    <plugin name="text" url="../plugins/textfield.swf"
    parent="textbox"
    align="lefttop" x="10" y="10"
    background="false" borderwidth="0"
    html="data:testtext"
    css="p{color:#000000; font-family:Arial; font-size:12;}"
    autosize="left"
    mask="textmask"
    />

    <!-- textfield mask to maskout hidden/out-scrolled text -->
    <plugin name="textmask" url="images/box.png"
    parent="textbox"
    align="lefttop"
    x="5" width="255"
    y="5" height="190"
    />

    <!-- buttons for textscrolling - just move the textfield up and down -->
    <plugin name="scrollup" url="images/dirbutton.png"
    parent="textbox"
    align="righttop"
    x="24"
    y="5"
    rotate="-90"
    crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
    ondown="tween(plugin[text].y, 10, distance(400,0.7), linear);"
    onup="stoptween(plugin[text].y);"
    />

    <plugin name="scrolldown" url="images/dirbutton.png"
    parent="textbox"
    align="rightbottom"
    x="24"
    y="5"
    rotate="+90"
    crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
    ondown="tween(plugin[text].y, -265, distance(400,0.7), linear);"
    onup="stoptween(plugin[text].y);"
    />

    <!-- testtext -->
    <data name="testtext">
    <p>
    test text test text test text<br/>
    <br/>
    test text test text test<br/>
    text test text test
    <br/>
    <a href="event:action(hidewindow,textbox);action(showbutton);">schliessen</a>
    <br/>
    text test text test text test<br/>
    text test text<br/>
    test text test text test text<br/>


    </p>
    </data>

  • klasse, hat geklappt!!

    zum abschluß:
    wie kann ich den button erweitern, damit beim erneuten klick das textfeld ausgeblendet wird??

    <plugin name="nav_info" url="images/b_info.png" keep="true" zorder="2" origin="rightbottom" x="240" y="-70" onhover="showtext(Hilfe);" onover="set(blendmode,add);" onout="set(blendmode,normal);" onclick="action(show_textbox_field);" />

  • guten morgen,

    ich bin immer noch an meinem sch.... textfeld zugange.
    mittlerweile habe ich zwar hinbekommen, dass sich das textfeld ein- und ausblenden lässt, aber wenn ich in dem textfeld einen link, z.b.
    zu einer pdf-datei habe, reagiert er nicht!?!

    ich verstehe das nicht, was ist denn nun wieder falsch?
    paul

    -!-- info panel content -->
    <plugin name="info_panel_content" onclick="action(show_textbox);" keep="true" url="images/info_vk.png" zorder="2" origin="leftbottom" x="5" y="-100" selectable="false" />

    <!-- info panel definition -->
    <plugin name="info_panel" keep="true" url="images/b_panel_info.png" zorder="1" origin="leftbottom" x="5" y="-100" selectable="false" />

    <!-- info panel control -->
    <plugin name="info_panel_control" url="images/b_open_info.png" keep="true" handcursor="true" zorder="2" origin="leftbottom" x="14" y="1" selectable="false" onhover="showtext(Informationen anzeigen/ausblenden)" onclick="action(showinfo);" />


    <!-- actions for info panel tweening ICH GLAUBE HIER IST IRGENDWO EIN FEHLER *cursing* ->
    <action name="hideinfo">tween(plugin[info_panel_content].y,-100); tween(plugin[info_panel_control].y,1); tween( plugin[info_panel].y,-100,,, set( plugin[info_panel_control].url, images/b_open_info.png ); set( plugin[info_panel_control].onclick, action(showinfo) ); );</action>
    <action name="showinfo">set( plugin[info_panel_control].url, images/b_close_info.png ); set( plugin[info_panel_control].onclick, action(hideinfo) ); tween(plugin[info_panel].y,0); tween(plugin[info_panel_control].y,100); tween(plugin[info_panel_content].y,0);</action>

    <action name="show_textbox">set(plugin[textbox].visible,true); tween(plugin[textbox].alpha,1); set(plugin[info_panel_content].onclick,action(hide_textbox)); </action>
    <action name="hide_textbox">tween(plugin[textbox].alpha,0,,,set(plugin[textbox].visible,false));set(plugin[info_panel_content].onclick,action(show_textbox)); </action>

    <!-- textfeld mit scroller -->


    <!-- scale9grid scaled textbox image -->
    <plugin name="textbox" url="images/textfield.png"
    align="lefttop" x="10" y="10"
    scale9grid="5|5|12|55"
    width="400"
    height="300"
    alpha="0.00"

    />

    <!-- the textfield itself -->
    <plugin name="text" url="plugins/textfield.swf"
    parent="textbox"
    align="lefttop" x="10" y="10"
    background="false" borderwidth="0"
    css="p{color:#000000; font-family:Arial; font-size:12;}"
    autosize="left"
    html="data:textbereich"
    mask="textmask"

    />

    <!-- textfield mask to maskout hidden/out-scrolled text -->
    <plugin name="textmask" url="images/box.png"
    parent="textbox"
    align="lefttop"
    x="5" width="380"
    y="5" height="280"
    />


    <!-- buttons for textscrolling - just move the textfield up and down -->
    <plugin name="scrollup" url="images/dirbutton.png"
    parent="textbox"
    align="righttop"
    x="24"
    y="5"
    rotate="-90"
    crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
    ondown="tween(plugin[text].y, 10, distance(400,0.7), linear);"
    onup="stoptween(plugin[text].y);"
    />

    <plugin name="scrolldown" url="images/dirbutton.png"
    parent="textbox"
    align="rightbottom"
    x="24"
    y="5"
    rotate="+90"
    crop="0|0|19|19" onovercrop="0|19|19|19" ondowncrop="0|38|19|19"
    ondown="tween(plugin[text].y, -265, distance(400,0.7), linear);"
    onup="stoptween(plugin[text].y);"
    />

    <!-- testtext -->
    <data name="textbereich">
    <p><br/>
    text text<br/>
    <a href="test.pdf" target="_blank"><b>Aktuelles Programm</b></a>
    </p>
    </data>

Participate now!

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