AKAIK, a constructor is always invoked when an instance is created and there's 
no way around that.
So if you have some trace() actions in the contstructor of ClassB and you don't 
see the output, no instance is created.
Which in this case probably means that someFunction() is not being invoked.

When is the moveUP event dispatched?

regards,
Muzak

----- Original Message ----- From: "Sajid Saiyed" <sajid.fl...@gmail.com>
To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
Sent: Tuesday, September 01, 2009 8:12 AM
Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue


Ok, Here is a bit more information.

ClassA (works pefrectly fine):
-----------
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassA extends ClassC
{
           public var myMenu: ClassB;

           public function ClassA (){
                addEventListener(ClassC.moveUP, someFunction);
           }
           public function someFunction(){
                myMenu = new ClassB();
myMenu.name = "mymenu";
this.addChild(myMenu);
           }

       }
}

ClassB
-----------
package com.folder.subfolder
{
   import flash.display.*;
   import flash.events.*;
   import flash.filters.*;
   import flash.utils.Timer;
   import com.folder.subfolder.*;

   public class ClassB extends ClassC
{
           public function ClassB (){
                // This is not getting called.....
           }
       }
}


Does this explanation help a bit??
Am I looking at the right place for the problem or the problem could
be somewhere else?

Thanks
Sajid

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to