degressor Posted February 24, 2016 Share Posted February 24, 2016 Hi, I'm new to pharser. I created several functions like move() in the Game.js TestGame.Game.prototype = { ... drawPath: function() { ... } Everything is working well. No I would like to access the drawPath function from outside oth the class, e.g. <button onlick="TestGame.Game.drawPath()"> but get "is not a function" Error. Link to comment Share on other sites More sharing options...
degressor Posted February 24, 2016 Author Share Posted February 24, 2016 I found a solution on my own. Thx anyway TestGame.game.state.states['Game'].drawPath() VitaZheltyakov 1 Link to comment Share on other sites More sharing options...
Recommended Posts