Skip to main content
July 14, 2018
Answered

¿Cómo puedo guardar y recuperar información en adobe animate?

  • July 14, 2018
  • 1 reply
  • 564 views

Hola a todos.

¿Cómo puedo guardar y recuperar información en adobe animate?

Por ejemplo, Guardar la puntuación en un videojuego y que no se pierda al cerrar el programa.

Muchas gracias.

This topic has been closed for replies.
Correct answer chenjil43641795

AS3

Save:

var test:SharedObject = SharedObject.getLocal( "test" );

test.data.user = "username";

test.data.psw = "password";
test.flush(); //提交保存

read


var test: SharedObject = SharedObject.getLocal("test");
Alert.show(test.data.user);
Alert.show(test.data.psw);

as3 Reference address

Adobe Flash Platform * Shared objects

HTML5

localStorage.getItem(key)://Gets the value of the specified key local store

localStorage.setItem(key,value)://Value is stored in the key

localStorage.removeItem(key)://Deletes the value of the specified key local store

html5 Reference address

HTML 5 Web 存储

1 reply

chenjil43641795
chenjil43641795Correct answer
Legend
July 15, 2018

AS3

Save:

var test:SharedObject = SharedObject.getLocal( "test" );

test.data.user = "username";

test.data.psw = "password";
test.flush(); //提交保存

read


var test: SharedObject = SharedObject.getLocal("test");
Alert.show(test.data.user);
Alert.show(test.data.psw);

as3 Reference address

Adobe Flash Platform * Shared objects

HTML5

localStorage.getItem(key)://Gets the value of the specified key local store

localStorage.setItem(key,value)://Value is stored in the key

localStorage.removeItem(key)://Deletes the value of the specified key local store

html5 Reference address

HTML 5 Web 存储

July 15, 2018

Muchas gracias. Justo lo que necesitaba.