Sajid Saiyed
Tue, 01 Sep 2009 08:43:49 -0700
yes, someFunction is getting called. If I change ClassB to: //// public class ClassB extends MovieClip or public class ClassB extends Sprite //// Then the constructor gets called.
I still have to try super() as suggested by Steven (I am at home now
so dont have the code with me)
So Steven,
Do youmean that I just add "super()" in the first line of ClassA constructor?
Regards
Sajid
On Tue, Sep 1, 2009 at 11:03 PM, Jim Lafser<jimlaf...@yahoo.com> wrote:
> Have you verified that someFunciton is getting called?
> Is someFunction getting called in the scope that you expect?
> May need to use:
> addEventListener(ClassC.moveUP, Delegate.create(this, someFunction);
> to get someFunciton to run in the scope that you expect.
>
> --- On Tue, 9/1/09, Steven Sacks <flash...@stevensacks.net> wrote:
>
>
> From: Steven Sacks <flash...@stevensacks.net>
> Subject: Re: [Flashcoders] Problem understanding Class heirarchy issue
> To: "Flash Coders List" <flashcoders@chattyfig.figleaf.com>
> Date: Tuesday, September 1, 2009, 9:11 AM
>
>
> You're not calling super() in the ClassA constructor.
>
>
> On Aug 31, 2009, at 11:12 PM, Sajid Saiyed wrote:
>
>> 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
>
>
>
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders