Plugin in variable?

  • Hi!

    I have a panorama where a number of textfield pluging appears on user clicks. It acts like a tooltip. Is there any way to close previsiously opened textfield plugin?

    Every time user clicks on some hotspot the textfield apears visible. Clicking on tooltip user can close it. Also, clicking on other hotspots brings user new tooltip.
    Is there any way to remember current active textfield plugin so I can close it further?

    This is my code:

    Code
    <action name="show_html_field">
    		set(plugin[%1].y,-1500);
    		tween(plugin[%1].alpha, get(HOTSPOT_OPACITY), 0.3);
    		tween(plugin[%1].textblur,0,0);
    		tween(plugin[%1].blur,0,0);
    		set(plugin[%1].visible,true);
    		set(plugin[%1].enabled,true);
    		tween(plugin[%1].y,0);
    	</action>

    I've tried to set %1 to a variable to do like this:

    But this doesn't work. trace result is: "INFO: get(current_textfield)".

    Any ideas?

  • try

    Code
    set(CURRENT_TEXTFIELD,%1);

    Don't surround the %1 with a get(). The get will dereference the plugin name you pass in and will most likely return null to the set command. Thus, current_textfield is set to null. Tracing a variable that has been set to null prints the variable name, in this case "current_textfield".

    Steve

  • Thanks for your reply Steve,

    Seems like this will not work.

    Here is an example:

    Code
    <action name="do">
    		set(CURRENT_TEXTFIELD, %1);
    		trace('will: ' + CURRENT_TEXTFIELD);
    	</action>

    The result of execution is:

    Code
    INFO: 'will: ' + CURRENT_TEXTFIELD

    Ofcourse, action 'do' is called with argument.

Participate now!

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