Hello :)

you can use the Function Constructor of the SuperClass too


class MyClass extends SuperClass {

    function MyClass ( param ) {

            trace("test1 in MyClass constructor") ;

            SuperClass.call(this, param) ; // like super()

            trace("test2 in MyClass constructor") ;

    }

}

EKA+ :)

2006/6/15, André Goliath <[EMAIL PROTECTED]>:

Sorry, I ment

That should always be the first line in constructors of inherited classes,

not the first line of the class itself...

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of André
Goliath
Sent: Thursday, June 15, 2006 12:38 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Class overloading question


RTFM @ super()

This will call the parent constructor with the parameters you pass to it.
That should always be the first line in inherited classes.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nik
Derewianka
Sent: Thursday, June 15, 2006 11:19 AM
To: Flashcoders mailing list
Subject: [Flashcoders] Class overloading question

Hi All,

Im trying to overload the Sound class to add my own features, it works
fine
for all the basic features, but what do i need to do with my class to pass
through a parameter to the constructor of the superclass ?  ie for the var
x
= new ExtendedSound(my_soundMC), what do i need to call in my class to
pass
the my_soundMC up to the original Sound class?  (ExtendedSound already has
extends Sound in its class definition).

Regards,
--
:: Nik Derewianka ::
:: freelance director programmer ::
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to