Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
If we have an HTML5 game running in a parent window, is it possible to send messages into the game from externally? Can we target into a running game if we know a desired javascript function exists in the game, can the game start an event listener in the parent window or do we have to go to some larger solution such as pinging a shared webservice or websockets backend?
Thanks in advance
Andrew
If you are happy to write JavaScript code, you can communicate between local frames and windows using the postMessage() API.
Thanks, 8 had seen that api but what about communication in the other direction, is that possible? For example, we may have a menu item in the main window that would pause the game, disable sound or start a specific game scene. Thanks
Develop games in your browser. Powerful, performant & highly capable.
Yes, it covers that.