0 Replies Latest reply on Sep 29, 2010 2:22 AM by ParadaGirl

    about attachMovie...

    ParadaGirl

      CS3. AS 2.0

       

      class Link

      MovieClip1 <= class Test1

      MovieClip1.MovieClip2 <= class Test2

       

      ----------------------------------------

      class JJ.Test1 extends MovieClip
      {
      private var InMC : JJ.Test2;

      public function PrintA() : Void
      {
        trace("AAA");
       
        InMC.PrintB();

      }

      ----------------------------------------

      class JJ.Test2 extends MovieClip
      {
      public function PrintB() : Void
      {
        trace("BBB"); 

      }

      ----------------------------------------

       

      <case 1> static new. and call PrintA().

      result:

      AAA

      BBB

       

      <case 2> dinamic new. => use attachMovie function. and call PrintA()

      result:

      AAA

       

      (not call PrintB() )

       

      I want to 'dynamic new' and 'call function'.

       

      I can't speak English very well yet. Srroy.

      Thanks. Have a good day.