7 Replies Latest reply on Nov 1, 2010 7:19 AM by kglad

    Change loaded movie from child

    Yue_Hong Level 1

      Hi,

       

      I am new to AS3. Here I want to ask how to change the loaded movie from child?

       

      Here is my working code, but it doesn't works...

       

      Root:

       

      var contentMovie:MovieClip = new mcMain;
      contentMovie.name="content_mc";
      addChild(contentMovie);

       

       

      Child Content:

       

      changecontent_btn.addEventListener(MouseEvent.CLICK,LoadContent);
      function LoadContent(event:MouseEvent):void
      {
         parent.contentMovie = mcNew;
      }

       

      When I try to run, Flash shows the error "1119: Access of possibly undefined property contentMovie through a reference with static type flash.display:DisplayObjectContainer."