Calculator question

hi ppl :P, i realize that this are probably stupid questions, but the last time i used flash was in flash mx and ALOT has changed… and i have been unable to find a tutorial that explains two things that i need:

1- i am trying to get the user to introduce a number into a textbox(input text right?)
and after pushing button “x” the output box (dinamic text) shows the input+2…

i followed this tutorial: 
   http://www.quantunet.com/flash8/skills/sample/input_text_field_process.html

so, as i start doing this i realize that for some reason flash 8 doesnt take the parameter  "variable" in a text box so i make a file with actionscript 2.0 and still i get no luck.. this is the code i used being the instance names for: button "enter_btn" input text "input" and the dynamic text "output"

enter_btn.onRelease = function ()
{
output=2 + input;

}
So, when i run the flash movie and i hit the button i get a [COLOR=Navy]“nan”[/COLOR] (not a number), so i assume input is not an integer but a string so i use the function [COLOR=Red]parseInt()[/COLOR], and still get a “nan”. the only way for me not to get a [COLOR=Navy]nan[/COLOR] is by setting output=input. but thats kinda useless isnt it?"

so my questions are:
why didnt this worked?
how could i make this on as 3.0?
could i make the calculator automatic? i mean changing the output without stepping on a button?, how?.

off topic question: how would i get data stored in an external .txt file?, and readed from an external file? (a link that explains it would do too :P)