What is a super()

Really dumb question, really a beginner of openfl came from coding flash. what is a super()? what’s its purpose?

This is more of a Haxe than an OpenFL question. Check this Haxe Manual page: https://haxe.org/manual/types-class-inheritance.html

It connects back to the super class. So if you are extending your class with a parent class like MovieClip, Sprite , EventDispatcher etc.

class  A extends MovieClip {

       function new () 

    {

    super() ; 

    }

    }

Then you must call super ( ) in the constructor ( new function ) . If you don’t extend your class, it’s not required.
:slight_smile:

Just a friendly advice: To become a good programmer, learn to google.
99% of things you dont know did happen to people before you. Just typing the topic “What is a super()” into google gives you all the answers and it saves you and everyone elses time.

Thanks for asking and let us know how else we can help :smiley: