Hi, firstly can I say I'm not a Hype or javascript expert so any help will be welcome.
I'm using Hype as an html5 animation tool for elearning purposes. The main elearning course is built in Adapt and the Hype interactive animations will sit inside Adapt iframes. The idea is that Hype sends an interaction 'complete' message via postMessage to Adapt. The Adapt iframe is ready built to listen for a postMessage sending 'complete'. So the external iframe is the parent and Hype is the child.
If I put the following in a simple html page window.parent.postMessage('complete', '*'); on my web server and reference the html page within the iframe I can trigger the iframe interaction as complete without any issues.
I have built a test Hype page with a simple button and a javascript function using the same code but when it is all online (Adapt iframe and Hype animation inside) I'm not triggering the complete status.
I'm also running an alert on the button (which works) so I'm fairly sure the javascript postmessage function is running.
Could it be that the external iframe is not found with window.parent from inside Hype and needs something else putting into the javascript function.
regards
Trevor