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
hello :)
in AS1 :
_global.SuperSound = function ( mc ) {
super (mc) ;
}
SuperSound.prototype.__proto__ = Sound.prototype ; // inherit
in AS2 :
class SuperSound extends Sound {
// o Constructor
function SuperSound( mc ) {
super(mc) ;
}
}
You can use super to
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
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
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
Thanks all :)
Regards,
--
:: Nik Derewianka ::
:: freelance director programmer ::
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to
6 matches
Mail list logo