Hello Everyone, I've been working on a solution to my textfield issues and have come up with a good balance of functionality but having one little problem that I've been searching the forum for a fix.
Basically what I am looking to do is as follows:
I will have multiple textfield plugins ex. plugin_05_01_html5, plugin_05_02_html5, plugin_05_03_html5, etc..
I've managed to create an actions that dynamically builds the plugin that adds the background image, close button and sets the mask.
I've create another action the closes everything.
The constant here is the background. Never changes size, the variable is the textfield that holds the content. The question is How do I set the close action for the textfield with only one action. the textfields will only be opened and closed one at a time. The only other way I am thinking is using an if then else statement but I tried it and nothing happened.
I hope my explanation is clear. I can build it if I am pointed in the right direction.
Thanks,
Robert
<hotspot name="hs_05_01" devices="flash|android|html5" style="hotspot_ani_white"
ath="199.97558228887985" atv="-5.672625480614146"
zoom="false"
onhover="showtext(call open texfield, csmall);"
onclick="action(open_bkg,textfield_bg); set(plugin[plugin_05_01_html5].visible,true);"
/>
<!-- FOR IPAD|IPHONE ONLY -->
<plugin name="plugin_05_01_html5"
devices="html5"
align="center" x="0" y="0" width="400" height="100" backgroundalpha="0" zorder="10001" keep="false" visible="false"
onloaded="" altonloaded="if(isphone, set(y,10)); if(isphone, set(x,50));onloaded();"
url="%SWFPATH%/plugins/textfield.swf"
css="p{color:#FFFFFF; font-family:sans-serif; font-size:12; margin-left:5; margin-right:5; text-align:left; }"
html="[div style='background-color: #000; background:transparent; text-align:left; font-weight:bold;']
BLAH BLAH BLAH:
[br]
[span style='text-align:left;font-weight:normal;']
MORE BLAH BLAH BLAH BLAH BLAH BLAH
[/span]
[p]
[span style='text-align:left; font-weight:normal;']
MORE BLAH BLAH BLAH BLAH BLAH BLAH
[/span]
[/p]
[/div]"
/>
<!-- BACKGROUND & COMPONENTS FOR HTML5 -->
<action name="open_bkg">
addplugin(mask);
set(plugin[mask].url,%CURRENTXML%/images/screen_tint.png);
set(plugin[mask].zorder,-1);
set(plugin[mask].visible,true);
tween(plugin[mask].alpha,.7,0.5,default);
set(plugin[mask].origin,lefttop);
set(plugin[mask].blendmode,multiply);
set(plugin[mask].width,100%);
set(plugin[mask].height,100%);
addplugin(textfield_bkg);
set(plugin[textfield_bkg].url,%CURRENTXML%/images/bg.png);
set(plugin[textfield_bkg].zorder,10000);
set(plugin[textfield_bkg].visible,true);
tween(plugin[textfield_bkg].alpha,1,0.5,default);
set(plugin[textfield_bkg].align,center);
set(plugin[textfield_bkg].width,400);
set(plugin[textfield_bkg].height,100);
set(plugin[textfield_bkg].x,0);
set(plugin[textfield_bkg].y,0);
if(isphone,set(plugin[textfield_bkg].scale,.75));
addplugin(button);
set(plugin[button].url,%CURRENTXML%/images/close.png);
tween(plugin[button].alpha,1,0.5,default);
set(plugin[button].align,center);
set(plugin[button].x,200);
set(plugin[button].y,-50);
if(isphone,set(plugin[button].x,150));
if(isphone,set(plugin[button].y,-38));
set(plugin[button].zorder,10001);
set(plugin[button].onclick, action(close_bkg));
</action>
<action name="close_bkg">
tween(plugin[textfield_bkg].alpha,0,0.5,default);
set(plugin[textfield_bkg].visible,false);
set(plugin[plugin_05_01_html5].visible,false);
tween(plugin[mask].alpha,0,0.5,default);
set(plugin[mask].visible,false);
set(plugin[button].visible,false);
removeplugin(button);
</action>
Alles anzeigen