I am working on inheritance for the first time
Here is the super class
SetBlank.as
import flash.text.*;
class SetBlank {
public var _textFieldName:TextField;
public var _defaultName:String;
public function SetBlank(textFieldName:TextField, defaultName:String) {
_textFieldName = textFieldName;
_defaultName = defaultName;
if (_textFieldName.text == _defaultName) {
_textFieldName.text = "";
}
}
}
I just want to inherit all the feature from SetBlank to ExtendSetBlank.as
ExtendSetBlank.as
import flash.text.*;
class ExtendSetBlank extends SetBlank{
function ExtendSetBlank(){
trace("abc")
}
}
I can see the trace function working but the method which sets the text field to blank is now working. I can’t figure out where I am wrong.
Please help.