I an new to Hype. I have created a hype document that worked fine when viewed on Hype Reflect on an iPad. I have now added some Javascript to the document, and now, when I preview on the iPad only the black background loads and the console error is Script error >Error:Script error. URL: L:0
I have added nothing to the head.html. This is what I have added that has now somehow broken it…
On seven buttons on the front screen I have added an OnMouseClick action to run Javascript. This sets a variable for timing purposes. Each button sets a different variable that has a different Start Time value. For example, the first button has this set…
function SetTimingClassic (hypeDocument, element, event) {
window.layoutStartTime = 0.0333;
}
The next screen (which never appears as the document fails on the first screen load) has OnLayoutLoad set to action this Javascript
function LayoutTimeLoad(hypeDocument, element, event) {
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Bun_Bottom’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Bun_Top’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Burger’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Bun’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Topping’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Cheese’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Burger’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Salad’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Slider_Relish’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Relish’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Salad’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Cheese’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Topping’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Bun’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Topping’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Cheese’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Burger’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Salad’);
hypeDocument.goToTimeInTimelineNamed(layoutStartTime, ‘Receipt - Relish’);
}
It also has On Layout Unload set to
function LayoutTimeUnLoad(hypeDocument, element, event) {
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Bun_Bottom’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Bun_Top’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Burger’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Bun’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Topping’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Cheese’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Burger’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Salad’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Slider_Relish’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Relish’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Salad’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Cheese’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Topping’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Bun’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Topping’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Cheese’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Burger’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Salad’);
layoutStartTime = hypeDocument.currentTimeInTimelineNamed(‘Receipt - Relish’);
}
Any help would be greatly appreciated. The document previews fine on Safari BTW.