Getting started on JS and made this adapting some tutorials and templates. I'm sure it has tons of errors... I have a form field where the user writes a word, and if it's correct, it goes to a Scene. So I did:
function confirmar(hypeDocument, element, event) {
if ( $('#nameForm').val() == "Test" ) {
hypeDocument.showSceneNamed('backlog', hypeDocument.kSceneTransitionPushRightToLeft, 1.1);
} else {
hypeDocument.showSceneNamed('restart', hypeDocument.kSceneTransitionPushRightToLeft, 1.1);
}
}
Any ideas?
respuesta-correcta.hype.zip (61.4 KB)