Trigger (.click) hype element (by ID) from iframe

Hmm,

Ok postMessage it is then.

I would suggest using Custom Behaviours to group all the actions and sound plays.

Then have the main window buttons trigger the relevant CB.
The CB names should match each button ID. Then we can use the CB name to get the button and its dataset.

(@jonathan Is the a request already to be able to add the original triggering element to the custom behaviour's event rather than the scene element )

The postMessage from the iframe data will be the same id for the main window buttons.

Note with postMessage I use a '*' as the target for the postMessage.
The suggestion is to be more strict and use your href/domain. So other windows ignore the message and they cannot post to your main window.


The child iframes run a timeline. At the end will trigger the PostMessage function.

Only two levels so it will loop...

Archive.zip (329.5 KB)

1 Like