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 call the superclass constructor
You can use "super" too in methods :
class SuperSound extends Sound {
// ----o Constructor
function SuperSound( mc ) {
super(mc) ;
this.target = mc ;
}
// -----o Public Properties
public var target:MovieClip ;
// -----o Public Methods
public function stop () {
super.stop() ;
trace("i stop the sound in : " + target) ;
}
}
EKA+ :)
2006/6/15, Nik Derewianka <[EMAIL PROTECTED]>:
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