Noobie AS3 Question

Hi there,

I have been happily using AS2 all my life but had to change to AS3 to introduce a 3rd party component to my site.

Frankly i get the point of AS3 being Object Orintated but I have a very basic question. Which after writing down became two questions!

My basic question is:
Do you really have to write all the elements to the stage? For example an input box needs to be created, formated, positioned, given a varible, set as an input box, etc all within ActionScript…

I have Googled this but all examples regarding AS3 i found start with creating the box within ActionScript which has confused me. Why is there a Text Tool?

Am I no longer able to simply draw the input box on the stage using the text tool, set its parameters with the property inspector and address it from within the code?

My objective and i suppose long question is:

Within AS3 I have drawn a text box on my stage and named it txtname.

When the user clicks or tabs into this box i want the contents to be immediately compared and if they match a previously defined variable clear the box.

In AS2 this would have been a simple onSetFocus, with an IF statement refering to the textbox variable and manipulating the contents accordingly.

How would you do this in AS3? I think it involves addListerners. But if i need to code out all elements in ActionScript i may stick to AS2.

I’m sorry for the noobie questions!

many thanks