Changin font size on the fly

I was working on a way to allow users to change the font size for all the words by clicking a button in my flash movie so I’ve come up with this line:

on (press) {
dropdownmov.var4 = font face=\Arial\ size=\12> var4 /font;


I was trying to get the html formatting applied to var4 and then saved as dropdownmov.var4 to make the text size increase. I’ve been looking for a way to allow the user to increase the font size and so far this is the only idea I’m getting after looking everywhere trying to find some function and trying other functions as well. I know you can modify Flash UI component text size and what not with some commands, but I haven’t seen anything neat for applying changes to text boxes in realtime. I had to take out the quotations and the <> from the piece of code I gave to make the whole line display on the message board, so just ignore the absence.

What you need to do is pass var4 through to a new variable that is inline with your new HTML code. That is the only way that I can think about how to do it.

My problem is getting the text out of the variable because when I make that statement the value of dropdown.var4 literally becomes “var4” as in the text becomes var4 onscreen. I’m not sure how I’d pull out the text within var4 to make the HTML format changes to it in the line I gave.

Can you post an FLA?

You just want to increase the font size? Apply the following code on a button:[AS]on(press){
myTextFormat = new TextFormat();
myTextFormat.size = 20;//set new size
}[/AS]Replace myTextField with the textfield instance name

I’m not having any luck with it. Just for testing purposes, I applied the code to the main button which has the instance name “scroller.” The grey “font size 12” button is the one that would make the changes to all of the text. Here I’ll attach the .fla if you’re interested in looking, it may just be some small error on my part.

First, you are not giving the correct path to the textfield. [read the 6th and 7th tutorials]
And second, i dont think you can change a text inside a button. Make a movie clip with a textfield and a button inside and it will work.