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
On Mon, Aug 31, 2009 at 10:46 PM, jonathan howe<[email protected]> wrote:
> Are you defining a subclass constructor and then failing to explicitly call
> the super() (superclass's constructor)?
>
> On Mon, Aug 31, 2009 at 8:37 AM, Sajid Saiyed <[email protected]> wrote:
>
>> I am already importing all the classes in the package.
>>
>> Still cant seem to get my head around this.
>> Maybe later today I will post excerpts of my classes here.
>>
>> That might help.
>>
>> Regards
>> Sajid
>>
>> On Mon, Aug 31, 2009 at 6:14 PM, Cor<[email protected]> wrote:
>> > Not knowing what you are trying to do, you have to import ClassB to
>> > instantiate it in ClassA.
>> >
>> > HTH
>> > Cor
>> >
>> > -----Original Message-----
>> > From: [email protected]
>> > [mailto:[email protected]] On Behalf Of Sajid
>> Saiyed
>> > Sent: maandag 31 augustus 2009 12:06
>> > To: [email protected]
>> > Subject: [Flashcoders] Problem understanding Class heirarchy issue
>> >
>> > Hi,
>> > I have following Class structure:
>> >
>> > ClassA extends ClassC
>> >
>> > ClassB extends ClassC
>> >
>> > ClassC extends ClassD
>> >
>> > ClassD extends MovieClip
>> >
>> > Now,
>> > If I instantiate ClassB from ClassA, the constructor does not execute.
>> > note: Inside ClassB, I am instantiating another ClassE which extends
>> > MovieClip
>> >
>> > Is there something I am doing wrong?
>> > _______________________________________________
>> > Flashcoders mailing list
>> > [email protected]
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> > _______________________________________________
>> > Flashcoders mailing list
>> > [email protected]
>> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>> >
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
>
> --
> -jonathan howe
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders