I am writing something in Flash/ AS3, and I came across this problem:
ReferenceError: Error #1056: Cannot create property txtInput on package.name.DocumentClas
It sounds like you have "Automatically declare stage instances" unchecked and thus if you want to add a named instances, you need to declare it in your class
import flash.text.TextField;
...
public var txtInput:TextField;
...
You can find the declare stage instances setting in the flash tab in your movie properties and clicking on "settings" next to Script: Actionscript 3 selectbox.
Personally I always have this unchecked so it forces you to declare the instances in your class and you can better keep track on what's going on.