terransage's Comments

  • Yes!! I tested your tutorial, and it works better than I expected: I can set the parent page var with something like Browser.ExecJS("parent.my_var = 5;") or ("parent.my_var = parent.my_var + 1;")

    I realized that this parent variable can then be passed to another parent page's variable via localstorage and then read from that variable by a separate Construct project embedded in an iframe there. I also learned that the "parent" can refer to the index.html that the Construct project is embedded in (if that page is not embedded in an iframe) or to the parent page containing the iframe containing the Construct project. In that case, "parent.my_var" ignores the index.html and refers to the main page containing the iframe. I haven't fully tested that whole process yet, but it seems doable. Thanks for the tutorial!

  • I'm away from my computer, so I can't test this yet, but it looks pretty good and useful. Can something like this be used to change the variable in the parent page from the iframe project? Instead of using postMessage? (I wish I was at my computer right now...)

terransage's avatar

terransage

Member since 12 Nov, 2014

None one is following terransage yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies