I am working on an “app” I’d like to put in iOS, where I want the hype project to remember the location (and maybe a score) so when the user returns to the app, they just pick up where they left off. Without having to click a load button.
Here is what this scenario would look like, “The user opens the ‘app’ and navigates to Scene 5. They close the app and return to it 2 days later. When they open the ‘app’, Scene 5 automatically loads up and let’s them pick up where they left off.”
I understand the concepts of local storage, however I’m a complete novice to javascript and html. Would you happen to know where I can find an example of something like this in a hype project?
In the example you provided you have a function where you clear local storage:
localStorage.clear();
Is there a way to only clear the names of the scenes recorded instead of cleaning all local storage. There may be other things stored there which I may still need.
I dug a little into local storage and came up with this. In this little project, not only the scene name but also the state of each timeline within each scene are stored in local storage and are kept the same even when you reload the page or close the browser accidentally.
Thanks for the reply Greg… I thought there might be an option when exporting in Hype 4, but it doesn’t sound like it.
Alternatively if you wouldn’t mind, I think if you were to “Export as HTML 5” and upload the two files (.html file and .hyperesources folder) I would be able to create an editable file using Hypes “Restore document from export” feature.