title: Instance disappears when animates
body: <p>I have made a MovieClip and attached it to the below code.When i test the movie and i have already placed an instance on stage it works fine.When i instantiate the object through code and add it to stage it disappears when i click it.I work in flash.</p>
  
  <pre><code>package {
  
  import flash.display.MovieClip;
  import flash.events.MouseEvent;
  import fl.transitions.easing.*;
  
  import com.greensock.*; 
  
  public class Card6 extends MovieClip {
  
      public function Card6( )        {
          addEventListener(MouseEvent.CLICK, Enter);
      }
      private function Enter( ev : MouseEvent ) {
          TweenMax.to(this, 0.25,  { rotationY: 180 }  );
      }
    }
  }
  </code></pre>
  
  <p>This is the code where i instantiate the MovieClip from the library,Card6 is the base Class.</p>
  
  <pre><code>var photo: MovieClip = new PhotoB( );
  photo.x = 100;
  photo.y = 300;
  stage.addChild(photo);
  </code></pre>
  
  <p>UPDATE :
  I succeed to make it work i don't know how since i didn't changed the code a bit.The problem is i don't know what is the solution and i encounter the same problem in other examples.
  This is the code i used in the first frame and worked.</p>
  
  <pre><code>var sp : DisplayObject = new border( ); //&lt;-- Different name,same Object
  addChild(sp);
  sp.x = 400;
  sp.y = 300;
  </code></pre>
  
  <p>And this is the code i used for the Main Class</p>
  
  <pre><code>package {
  
  import flash.display.MovieClip;
  
  public class DocumentH extends MovieClip {
  
      public function DocumentH( )    {
      var sp : MovieClip = new border( );
      addChild(sp);
      sp.x = 400;
      sp.y = 300;
      }
    }
  }
  </code></pre>
  
  <p>I can't tell what made the diferrence and worked.I try to do the exactly same thing in another fla and failed.In library i have only one square which a have convert it to MovieClip.
  (Here is a link with the fla <a href="http://www65.zippyshare.com/v/65975812/file.html" rel="nofollow">http://www65.zippyshare.com/v/65975812/file.html</a>). I use Flash CS4 Pro</p>