Beginner Q - How to keep states in a project

New Here ,
Jan 04, 2021 Jan 04, 2021

Copy link to clipboard

Copied

Hi

I am evaluating animate as a potential tool for making our online games / puzzles. So I should say I dont know much about animate yet. 

Is there anyway to keep states of the project for a user, between sessions? For example, if a user progresses in a project, and gets to a certain point in the game, or certain variables are set, if they restart or come back at a later time, is there any state saved, or anyway to save it? Is that built in, or have to do with javascript and cookies? (I know just enough about javascript to know thats an option in theory)

Views

76

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Hi.

 

There's no specific APIs for data storage in Animate.

 

The code written in HTML5 documents is pure JS + the CreateJS API to handle graphics and animations created in the IDE that are exported without compilation/transpilation.

 

So what I can recomend to you is to use JavaScript's sessionStorage API or a BaaS like Firebase, if you are not a backend developer, like me.

 

Regards,

JC

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

Hi JC

 

Thanks for your help. Everything you said there is new to me! So I'm guessing a bit what that all means! Is what you are describing here relatively easy for a technical person, without being an expert in coding? I assume that JS session storage is a server side module running on a webserver (all servers?). If it kind of works OOTB with just some API commands like, please save this session state, then it sounds good.

If it requires lines of debugged code to get one button to retain its state, then I think I will be unable to do it on my own.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 05, 2021 Jan 05, 2021

Copy link to clipboard

Copied

LATEST

Update - sorry just looked at JS Session Storage. I see it's client side, like a turbo cookie. 

 

Have you any experience with BaaS saving states for Animate project? Would that be easy to get going with?

Dave

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines