Add to stage from class

I have a class I am importing into main that looks like this:

import openfl.display.Sprite;
    class Game extends Sprite {
        public function makeMap(){
    		var mapImage = Assets.getBitmapData('assets/img/map.png');
    		mapBackground = new Bitmap(mapImage);
    		playMap = new Sprite();


    		playMap.y =0;

I am unable to add the sprite to the stage. From what I have read this should work but it does not render to the screen. Someone please help.

Is Game your main class?

If so, check to make sure that makeMap() is actually being called.

If not, check to make sure your main class calls addChild(game).

Thanks! I was not calling addChild(game)… I was calling a function directly but not the constructor.