Afraid not. You will have to use ActionScript if you want to add your extended textfield class.
EDIT: there is a hack way. source: http://board.flashkit.com/board/archive/index.php/t-738887.html
Actually, I've run into this exact
problem before. In my case, I was
trying to create a textfield with
extra behaviors for other some other
non-coder artists to use. I'll tell
you my original solution which is all
as3, but had a fatal flaw, and my
current solution, which is a
combination of as3 and jsfl.
The all as3 solution is great except
for 2 things: First, it happens at
runtime rather than build-time. That
means there's a small but real portion
of time where the movie isn't
correctly initialized. Second, it does
not play well if there are multiple
frames in the movie. The basic idea is
to detect the TextFields you want to
change, build things to replace them
with, then replace them on stage. You
can do this with either by extending
TextField, or building a class which
contains a TextField and handles the
interface to it. Let's say you're
doing the first. Add a constructor to
SmartTextField that copies all the
fields you care about:
public function SmartTextField(TextField tf)
{
this.text = tf.text; //continue with copy of anything relevant.
}
in your main movie have code which
detects and replaces the TextFields
you want to replace
var toreplace:Array = findTextFields();
var tf:TextField;
var stf:SmartTextField;
var where:int;
for (int i = 0; i < toreplace.length;i++)
{ tf = TextField(toreplace[i]);
stf = new SmartTextField(tf);
where = getChildIndex(tf);
addChildAt(stf,where);
removeChild(tf);
}
This works fine, except for the points
above.
The JSFL solution is a bit too complex
to go over in detail, but here's the
basics. Have an as3 class which wraps
a textfield with the new behavior you
want. Write a jsfl script which
iterates over the selected items, and
if it's a textfield, converts to a
symbol with a baseclass of your new
wrapper class. This has the advantages
that it happens at author time, and
things like position, instancename and
other stuff is automatically
preserved. It has the disadvantage
that jsfl has a lot of little annoying
quirks to work through.
edit: Of course, if this is only for a
single movie, you could forego the
jsfl converter script, and just do it
by hand. convert to symbol -> wrapper
baseclass.