Hello everybody. This is more an Haxe Lang question than openFL. I created a child class of Tile class (lets say MyTile) and I added some properties(lets say FrameCount). Now, If I need to make a clone of an instance of the class I created I should override the clone method and 1) call the parent clone and 2) set the FrameCount prop of the new instance created. NOW the return value of the inherited clone should be of class MyTile but if I make a super.clone() call, a Tile object is returned.
I found a walkaround copying the code of the clone function of Tile Class, but is not a good practice, so if anyone can give me an elegant solution I would really appreciate.