Hey everyone,
After spending a few days trying to get a temporary AS tag solution without sending the code through an AS formatter, I did manage to find a way (with help from the people at vb.org) to recreate code functionality for AS:
bold.onRelease = function() {
format = new TextFormat();
format.bold = true;
tfield.setTextFormat(format);
};
italic.onRelease = function() {
format = new TextFormat();
format.italic = true;
tfield.setTextFormat(format);
};
underline.onRelease = function() {
format = new TextFormat();
format.underline = true;
tfield.setTextFormat(format);
};
border.onRelease = function() {
tfield.border = true;
tfield.borderColor = 0xA4A4A4;
};
bground.onRelease = function() {
tfield.background = true;
tfield.backgroundColor = 0xD6E1F1;
};
fontcolor.onRelease = function() {
format = new TextFormat();
format.color = 0xFF0099;
tfield.setTextFormat(format);
};
//reset button
reset.onRelease = function() {
format = new TextFormat();
format.bold = false;
format.italic = false;
format.underline = false;
format.color = 0x1A5266;
tfield.setTextFormat(format);
tfield.border = false;
tfield.background = false;
}
I think this is better than the current method which does not preserve spacing!
Cheers!
Kirupa :ub: