Save State of Object after EPUB is Closed

  1. 3 years ago
    Edited 3 years ago by Luke S

    I want to add objects to my epub, that save their "state" after the epub is closed and reopened. For example, a button is tapped, which changes the color of another object from red, to blue, to green. Is it possible to make the object "save" its state after the epub is closed?

    In other words, when my son opens the epub, and taps the button, the shape will change from red to blue. Is there a way to make the object "save" its state so that when he reopens the epub, the shape is still blue (and does not revert back to its default state of "red").

    Thank you!

  2. Angelo S

    30 Jun 2020 Administrator

    Hello Luke,
    there's no such generic functionality built into pubcoder, a part from the Coloring Game widgets, which can save the drawing automatically.
    But you can achieve this via Javascript using LocalStorage.

 

or Sign Up to reply!