Fork me on GitHub

Drawing multiple scenes

Since v2.6.0 by bendmorris

Usually scenes are switched by setting HXP.engine.scene:

HXP.engine.scene = new MenuScene();

Starting in 2.6.0, you can use an alternative method to draw a temporary scene over the previous scene. This is useful for things like popup windows.

Set your Scene's alpha to a value less than 1:

class MenuScene extends Scene
    public function new()
        alpha = 0.5;

    public function close()

Then use pushScene to push your scene on top of the scene stack:

HXP.engine.pushScene(new MenuScene());

The parent scene will no longer be active (update won't be called automatically) but it will be visible underneath your MenuScene.

When you call HXP.engine.popScene(), your scene will be removed from the stack, setting the previous scene active again.


  • Emitter backward animation
  • Haxedef flags
  • Managing assets
  • Multi-platform input
  • Tileset spacing