Folks,
I would be immensely grateful if someone can see what I am doing wrong please.
I am trying to have text dynamically scale as the screen size is adjusted. I am using an action in the onresize event. Inside the action I check to see if the plugin using the textfield is loaded. If it is, I remove it and then re add it again. The plugin uses a style and the style uses some CSS which has within it the font size set at 15%. However although every works, the plugin does get removed and re added the font size still appears the same on the screen although the screen size has changed.
Any help please.
Nigel
<events onresize=" resetfonts() "/>
<action name="resetfonts">
if(plugin[churchInfobox].loaded, removeplugin(churchInfobox), addplugin(churchInfobox); plugin[churchInfobox].loadstyle(Infoboxplugin); set(plugin[churchInfobox].html, data:churchdata);)
</action>
<style name="Infoboxplugin"
parent="stage"
enabled="true"
visible="true"
autoheight="true"
alpha="0"
bacgroundalpha="0.1"
url="textfield.swf"
scaletext="true"
roundedge="15"
borderwidth="2"
glow="0"
align="topmiddle"
background="true"
keep="true"
x="0" y="2%" width="20%" height="8%"
css="data:cssdata1"
borderwidth="2"
bordercolor="0xffffff"
backgroundcolor="0xCCEBCC"
selectable="false"
children="false"
onover="set(backgroundcolor,0xFFFFFF);tween(glow,10);"
onout="set(backgroundcolor,0xCCEBCC);tween(glow,0);"
/>
<data name="cssdata1">
showtext {
font-family: "Trebuchet MS,Verdana,sans-serif", cursive;
font-size: 15%;
} </data>
<data name="churchdata">
<showtext>Click here for information </showtext>
</data>