Hei all,
My documents keypresses work fine in the exported html file but when embedded inside an iFrame the keypresses stop working. Even after I click inside the iframe and interact with the objects in it.
I have it implemented through OnSceneLoad with this script:
[details=script]
document.onkeydown = checkKey;
function checkKey(e) {
e = e || window.event;
if (e.keyCode == ‘39’) {
// right arrow
hypeDocument.showSceneNamed(‘scene04_00’,hypeDocument.kSceneTransitionPushRightToLeft);
}
else if (e.keyCode == ‘37’) {
// left arrow
hypeDocument.showSceneNamed(‘scene02_00’,hypeDocument.kSceneTransitionPushLeftToRight);
}
}[/details]
Any ideas how to get it working inside an iFrame? For me it’s strange that clicking/focusing inside the iframe does not make it work.
Thanks,
Edgar
Edit:
Surprisingly pressing TAB inside the iframe makes all the keypresses work again. Is there anyway to do this on the documents load?