Save and load Sprite co-ordinates ?

Get help using Construct 2

Post » Mon Jun 04, 2012 12:29 am

you can only download the jsonstring, and the import gives me troubles,

much better would be like dictionarytostring and save this in var or webstorage

edit: maybe use rexrainbow hashtable, its almost the samevtrix2012-06-04 00:33:05
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Jun 04, 2012 12:58 am

yes it works,

example

so now when added a couple of "states" when pressing savetowebstorage

it will safe the hashtable with all states to webstorage
when page refresh it reloads the hashtable from webstorage

ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Jun 04, 2012 2:09 am

[QUOTE=vtrix] yes it works,

example

so now when added a couple of "states" when pressing savetowebstorage

it will safe the hashtable with all states to webstorage
when page refresh it reloads the hashtable from webstorage

[/QUOTE]

Just tested your example....brilliant.

I will update post tomorrow(?) after trying to implement into the project.

Thanks for your help.

B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Mon Jun 04, 2012 10:02 pm

vtrix...thanks for helping me with this project...
I have a couple more questions regarding local storage?

Your 'hashtoweb storage' saves the sprite details in the folder-

C:\Users\Administrator\Local Settings\Application Data\Google\Chrome\User Data\Profile 7\Local Storage

The file is named-

http_localhost_50000.localstorage (on my system anyway)

My question is...can this file be opened/edited in any text editor?

I have tried using word, notepad, ultraedit and others?
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Mon Jun 04, 2012 10:57 pm

You can edit the local storage directly in Chrome with the Developer Tools. CTRL-SHIFT-I then click on Resources.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Jun 05, 2012 12:01 am

[QUOTE=ramones] You can edit the local storage directly in Chrome with the Developer Tools. CTRL-SHIFT-I then click on Resources.[/QUOTE]

After opening the developer tools/console, were do I locate the file i need to edit-

'http_localhost_50000.localstorage' ?
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Tue Jun 05, 2012 12:17 am

Click 'Resources' on the top bar and then 'Local Storage' -> 'localhost' on the left.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Tue Jun 05, 2012 12:22 am



Can't see it?
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Tue Jun 05, 2012 12:26 am

Oh. Make sure you're viewing the localhost page when you open dev tools.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Wed Jun 06, 2012 9:34 pm

[QUOTE=ramones] Oh. Make sure you're viewing the localhost page when you open dev tools.[/QUOTE]

Ok thanks..its still a bit hard to read!
---------------------------------------------
vtrix

I couldn't incorp your example with my original capx, but I have put a smaller project together(because of the 'pin' behaviour)



Capx

Will keep you posted as it develops.
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: BipolarMike, totoe and 17 guests