Use textfield.swf

  • Prompt me, please, how to use "textfield" in the different scenes?I can show out text with a mask only in one scene. If I try to use at once in two - that nothing works (even at the different names of plugins, for example textbox1). Here part of text :

    <hotspot name="showtexton"
    url="images/hp_10.png"
    distorted="true"
    ath="121"
    atv="20"
    scale="0.8"
    rx="0" ry="0" rz="0"
    zorder="1"
    onclick="action(text_show);"
    />

    <action name="text_show">
    set(plugin[textbox].visible, true);
    set(plugin[text].visible, true);
    set(plugin[textmask].visible, true);
    set(plugin[scrollup].visible, true);
    set(plugin[scrolldown].visible, true);
    </action>

    <action name="hideintext_show">
    set(plugin[textbox].visible, false);
    set(plugin[text].visible, false);
    set(plugin[textmask].visible, false);
    set(plugin[scrollup].visible, false);
    set(plugin[scrolldown].visible, false);
    </action>

    <!-- scale9grid scaled textbox image -->
    <plugin name="textbox" url="images/textfield.png"
    visible="false"
    align="center" x="10" y="10"
    scale9grid="5|5|12|55"
    width="460"
    height="320"
    onclick="action(hideintext_show);"
    />

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

    <!-- textfield mask to maskout hidden/out-scrolled text -->
    <plugin name="textmask" url="images/box.png"
    parent="textbox"
    visible="false"
    align="left"
    x="5" width="420"
    y="5" height="300"
    onclick="action(hideintext_show);"
    />

    <!-- buttons for textscrolling - just move the textfield up and down -->
    <plugin name="scrollup" url="images/dirbutton.png"
    parent="textbox"
    visible="false"
    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"
    visible="false"
    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="text" font="Times New Roman">
    <p>
    Example
    </p>
    </data>

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!