textfield and action

  • Hi,

    I'm trying to add and action in a textfield, but I don't know how to wright it.

    <![CDATA[<div><a><img src="img.jpg" border="1" width="285" height="177" href="action:welcome()"></a></div>

    As I seen here in the forum I putted in the layer calling the action : interactivecontent="true"
    The action "welcome" is working, but how to use it in the text ?
    Thanks a lot

  • Textfield layer:

    <layer name="Scrollarea" url="scrollarea.swf" alturl="scrollarea.js"><layer name="layerimg" type="text" "/></layer>


    <data name="test">[img src="images/menu1001.jpg" width="100%"][img src="images/menu1002.jpg" width="100%"][img src="images/menu1003.jpg" width="100%"][img src="images/menu1004.jpg" width="100%"][img src="images/menu1005.jpg" width="100%"][img src="images/menu1006.jpg" width="100%"]</data>


    <action name="do">set(layer[layerimg].html,data:test);copy(layer[Scrollarea].height,layer[layerimg].height)</action>


    [size=10]how to get layer[[size=10]layerimg[size=10]].height for [size=10]Scrollarea?

  • bonjour, je voudrais savoir en code XML...comment ouvrir et fermer plusieur fois un "textfield" voice mon code:

    <! - CROSS MENU 1 -> <layer name = "crossmenu1" url = "plugins / close.png" keep = "true" handcursor = "false" capture = "false" align = "righttop" x = "100%" y = "100%" width = "100%" height = "prop" alpha = "1" zorder = "1" scale = "0.5" scalechildren = "true" scale.mobile = "0.05"
    ondown = ""
    onclick = "closecrossmenu1 (); set (layer [textfield_player1] .visible, false);" />

    <action name = "opencrossmenu1">

    set (layer [crossmenu1] .visible, true);
    couche [crossmenu1] .changeorigin (centre, centre);
    ensemble (bigscale, 1);
    if (layer [crossmenu1] .imagewidth GT stagewidth, div (bigscale, stagewidth, layer [crossmenu1] .imagewidth););
    set (layer [crossmenu1] .x, 0);
    set (layer [crossmenu1] .y, 0);
    set (layer [crossmenu1] .scale, 0.05); )
    </ action>

    <action name = "closecrossmenu1">
    set (layer [crossmenu1] .visible, false);
    couche [crossmenu1] .changeorigin (centre, centre);
    ensemble (bigscale, 1);
    if (layer [crossmenu1] .imagewidth GT stagewidth, div (bigscale, stagewidth, layer [crossmenu1] .imagewidth););
    set (layer [crossmenu1] .x, 0);
    set (layer [crossmenu1] .y, 0);
    set (layer [crossmenu1] .scale, 0.0); )
    </ action>

    <nom de l'action = "create_player1">
    si (device.html5, addlayer (textfield_player1);
    set (layer [textfield_player1] .visible, true);
    set (layer [textfield_player1] .align, lefttop);
    set (layer [textfield_player1] .x, 10);
    set (layer [textfield_player1] .y, 10);
    set (layer [textfield_player1] .alpha, 0.0);
    set (layer [textfield_player1] .width, 800);
    set (layer [textfield_player1] .height, 400);
    set (layer [textfield_player1] .url, "plugins / textfield.swf");
    set (layer [textfield_player1] .html, "[iframe width =" 800 "height =" 400 "src =" http://www.******.fr/ "frameborder =" 0 "allowfullscreen] [/ iframe]" )
    set (layer [textfield_player1] .onloaded, show_player1 ()); )
    </ action>

    <action name = "show_player1">

    set (layer [textfield_player1] .visible, true);
    if (layer [textfield_player1],
    tween (layer [textfield_player1] .alpha, 1.0);
    opencrossmenu1 (); )
    </ action>

    <scène *************

    <plugin name = "menu1" url = "skin / menu.png" parent = "test" align = "leftbottom" x = "10" y = "10" onclick = "create_player1 ()" />

    </ scene>


    j'ouvre le "textfield" (avec un bouton dans une scene) puis la ferme mais je ne peux pas l'ouvrir une seconde fois..Merci pour votre aide *wink*
    i open "textfield" (with button on a scene) and close it but i can't open it a second time....Thanks for help *smile*

    Edited once, last by soona (March 8, 2019 at 2:57 PM).

  • ok i find the probleme...

    i just use removelayer() like this ...

    <!--CROSS MENU 1-->
    <layer name="crossmenu1" url="plugins/close.png" keep="true" handcursor="false" capture="false"
    align="righttop" x="100%" y="100%" width="100%" height="prop" alpha="1" zorder ="1"
    scale="0.5" scalechildren="true" scale.mobile="0.05"
    *g* *g* *g*

Participate now!

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