Container baseball with text

I’m trying to port this game:
http://www.xpmath.com/forums/arcade.php?do=play&gameid=9

So far I have:
http://www.xpmath.com/phaser/numberCatch/numberCatch.html

function newBaseball () is failing to add a baseball container with text.
This is my first attempt at Phaser after the intro tutorials. Thanks.

Hello, you are trying to use “this” (the scene) in a function not bound to it.
You have to pass it as parameter or call it with context. Try…
newBaseball.call(this)

1 Like