chemme1's Recent Forum Activity

  • Thanks, that worked :)

    For anyone reading this who is trying to do the same as I was, here are a few suggestions/tips:

    1) Firstly, obviously, make sure you set it up correctly. On the Event Sheet, after adding an event, add the script (the option 'add...' is furthermost right). Ensure 'Use worker' is set to no in the project properties.

    2) After exporting the game, to test it, I found using Netflify is a good website to host the game (don't use Itch.io - it blocks the postMessage, though you might figure out how to stop it from doing that).

    3) If you want to test that the recipient page is working, you can write a simple code (button with postMessage)then embed the iframe on your page (I used Glitch.com).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for your reply! Sorry, but I'm slightly struggling with the postMessage(). I'm trying to apply it to Action > Browser > Execute Javascript but it says that 'window' isn't recognised as an object. Am I going about this the correct way, and if so, what is the correct line of code which won't be restricted by Construct?

    I've tried some variations based around window.parent.postMessage("message", "*");

  • I know that Construct 3 has a sandbox environment. But is there a way for an embedded iframe to communicate a variable to a program like Twine / Pubcoder? I would love to subscribe to and use Construct, but I've not found anything that works and it's a necessity for me? Thank you for any and all help.

chemme1's avatar

chemme1

Member since 22 Feb, 2025

None one is following chemme1 yet!

Trophy Case

  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

3/44
How to earn trophies