Created
September 22, 2013 09:05
-
-
Save sergey-miryanov/6658172 to your computer and use it in GitHub Desktop.
subclass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package; | |
import flash.display.Sprite; | |
class Main extends Sprite { | |
public function new () { | |
super (); | |
var x = new SuperClass("super class"); | |
var y = new SubClass("sub class"); | |
} | |
} | |
class SuperClass { | |
public function new(name : String) | |
{ | |
ini(name); | |
} | |
function ini(name):Void { | |
trace("trace from superClass: " + name); | |
} | |
} | |
class SubClass extends SuperClass{ | |
override function ini(name):Void { | |
trace("trace from subClass: " + name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment