Saving and Loading an Array to WebStorage [CAPX]

Show us your completed creations made in Construct 2

Post » Tue May 15, 2012 11:37 am

You can use a sprite without Animation for storing images and get them with the expression AnimationFrame.. works like an array.. :)Joe72012-05-15 11:42:21
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Wed May 16, 2012 6:12 pm

Thanks. I'll try it.
B
19
S
6
G
4
Posts: 7
Reputation: 4,231

Post » Mon Jul 09, 2012 5:44 pm

Awesome, thanks mate.
ImageImageImageImageImageImage
Image
B
95
S
21
G
16
Posts: 1,337
Reputation: 20,955

Post » Tue Sep 11, 2012 9:46 pm

I have a hard time understanding this CAPX.

As I see it - it only stores the array to a global value that is saved with webstorage.

Then when you load it, it doesn't get back into the array again.

Can somebody tell me how to make this CAPX load the global value back into the CAPX please?
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Sep 11, 2012 9:52 pm

B
54
S
28
G
18
Posts: 1,520
Reputation: 25,070

Post » Tue Sep 11, 2012 10:11 pm

[QUOTE=ramones] @lokesen www.scirra.com/forum/copy-an-entire-array_topic53153.html

Example: arrayWebstorageExample.capx (r103)[/QUOTE]

Pretty good @ramones , thank you!
ImageImageImageImageImageImage
Image
B
95
S
21
G
16
Posts: 1,337
Reputation: 20,955

Post » Tue Sep 11, 2012 10:37 pm

[QUOTE=ramones] @lokesen www.scirra.com/forum/copy-an-entire-array_topic53153.html

Example: arrayWebstorageExample.capx (r103)[/QUOTE]

Wow!

That was 10 times easier than expected!

Thanks for the capx!
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Sep 11, 2012 10:51 pm

Never mind :)

Works like a charm!lokesen2012-09-11 23:27:48
B
7
S
3
Posts: 109
Reputation: 1,645

Post » Tue Dec 25, 2012 11:29 am

Thank you Haematite for this! I was struggling with saving an array for two days now. Should have googled earlier. ;)
B
6
S
1
G
2
Posts: 21
Reputation: 1,351

Post » Thu Sep 12, 2013 8:05 am

I've been senty here by @ramones. I didn't realise saving an array to webstorage would be so simple :-)
B
12
S
2
G
3
Posts: 86
Reputation: 2,955

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 7 guests