FP.Stage reporting Null


(Teonnyn) #1

I’m trying to use FP.Stage to reference the stage object in Flashpunk and Player.IO, but for some reason whenever I load the program it reports back “Null” and Player.IO errors out. I’ve never actually had this issue before so I don’t know quite what to do. Does anyone know of a way to grab the actual Stage object?


(azrafe7) #2

Chances are you’re trying to reference the stage in the Engine constructor. Move the logic in an overridden Engine.init() and I think you’ll be fine.


(Teonnyn) #3

Thanks! That was it exactly. I feel a bit silly for not catching that.