title: instance class from swc inside a movieclip
body: <p>i'm trying to use compiled assets and code from a swc.
  Inside a new fla I select the swc to be included when exporting.
  When create the instance in the timeline of the code works and I can see assets that are inside the swc and trace a propertie from the same object.
  The problem is only when doing the same inside a movieclip, can't reach the assets (movieclip) but I can still trace properties from the class.</p>
  
  <p>I've uploaded the working files:
  master.fla is the one that creates the swc.
  template.fla is where I test the swc.</p>
  
  <p><a href="http://www.complexresponse.com/out/test_swc.zip" rel="nofollow">files</a> (This are cs4 .fla + .swc + .as)</p>
  
  <p><strong>EDIT:</strong>
  How to reproduce the problem I had:</p>
  
  <p>.1 create a new master.fla and make it compile a swc.</p>
  
  <p>.2 In master.fla timeline create a Textfield, give it the instance name of "tfield" and make a MovieClip from it.</p>
  
  <p>.3 Create a TextBox.as class and define a public variable "tfield" (this will pickup the TextField asset you have inside your movie).</p>
  
  <p>.4 In library link the newly created MovieClip to the TextBox class.</p>
  
  <p>.5 Export and you should be seeing a instance of the TextBox class.</p>
  
  <p>using the swc:</p>
  
  <p>.1 Create a new fla and make it use the master.swc as source</p>
  
  <p>.2 open first frame in timeline and write the following code:</p>
  
  <pre><code>var tf : TextBox = new TextBox();
  addChild(tf)
  </code></pre>
  
  <p>This should work as expected, creating a instance of the TextBox and you should see the TextField inside.</p>
  
  <p>.3 comment the previous code and write the same code but this time inside a MovieClip and drop it to the timeline. Although the code works the "tfield" is not accessible. Nor you can see it.</p>
  
  <p><strong>SOLUTION:</strong> As pointed out by Daniel just give a linkage id to the MovieClip that contains the code (DON'T give the TextBox class id, just make it create a new class like "lalala").</p>
  
  <p>Thank you Daniel!</p>