I have built in some accessibility to one of my flash websites where you can increase the size using a Combobox - the problem is when I expand it to font size 18 the font obviously goes over the textfield and the scroll bar doesn’t increase to compensate for this!
The code I am using is:
function dropdown_check() {
if (textDD.getValue() == 1) {
var format:TextFormat = new TextFormat();
format.size = 12;
_root.content_txt.setTextFormat(format);
_root.content_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
} else if (textDD.getValue() == 2) {
var format:TextFormat = new TextFormat();
format.size = 14;
_root.content_txt.setTextFormat(format);
_root.content_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
} else if (textDD.getValue() == 3) {
var format:TextFormat = new TextFormat();
format.size = 16;
_root.content_txt.setTextFormat(format);
_root.content_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
} else if (textDD.getValue() == 4) {
var format:TextFormat = new TextFormat();
format.size = 18;
_root.content_txt.setTextFormat(format);
_root.content_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
_root.title_txt.setTextFormat(format);
}
}
//Check the status of the dropdown every ten miliseconds.
setInterval(dropdown_check,10);
textDD.onChanged = function() {
content_txt.text.scroll++;
if (content_txt.text>maxscroll) {
trace("I need to get bigger");
}
};
Any help would be great thanks!