title: Flash AS3: ReferenceError: Error #1056: Cannot create property
body: <p>I am writing something in Flash/ AS3, and I came across this problem:</p>
  
  <p><code>ReferenceError: Error #1056: Cannot create property txtInput on package.name.DocumentClasss</code></p>
  
  <p>Basically I have a document class, and I can create instances of movieclips clips and compile without issues. But when I put a input text field ("T" icon in the palette) on the stage, and it refuses to compile, with the above error.</p>
  
  <p>I am not sure if this makes a difference, but I am writing my ActionScript in FlashDevelop, with compilation done in the Flash IDE. I also have both <code>Strict Mode</code> and <code>Warnings Mode</code> selected  under <code>Publish Settings -&gt; Flash -&gt; Script -&gt; Settings... -&gt; Errors</code>.</p>
  
  <p>I have searched for solutions to this online, and the only suggestions out there seem to be to not insert the text field on the stag in Flash IDE, and instead dynamically create them in the document class.</p>
  
  <p>Is there a better solution?</p>
  
  <p>Thanks</p>