The file is a prototype example for my game's ketchup saving mechanism.
Here's how it works before talking about the problems:
I have 6 arrays (they are ketchup dots' X, Y positions & sizes) .
arX, arY, arS are for the ketchup 'Draw Screen' (no issues) &
recX, recY, recS are for the 'Record Screen'. (patterns saved permanently)
Click any to draw ketchup dots, the 'Save Record' button will appear at top-right.
Click the 'Save Record' button saves the ketchup pattern and goes to 'Record Screen' to view all the saved patterns.
At 'Record Screen' click left & right arrows to navigate the saved patterns. ('1' being the first)
The small pink button at the bottom-left clears all the data(localstorage).
Click 'Return' on the top-left to go back to 'Draw Screen' & it will start a new blank.
I added allXSave, allYSave & allSSave (json files) for storing array's data.
The Problems:
There's no ketchup patterns on the 'Record' screen when they are created from previous plays or after reset , resulting blanks on the spot. The ketchup patterns that I've made at this play will show up on 'Record' screen, but not after reset.
The JSON files do have the data stored, though.
I'm not familiar using JSON. I followed the codings from the tutorial but it won't work. Also the 'download as JSON' lines (event 15) pops up unwanted new windows with 'Download link' when testing on browser.
Can anyone help me for the codings cos' I am not too bright at this
Thanks.
(UPDATED: This is the fixed version, without using AJAX & Json files)
Capx Here: Ketchup Record- Fixed (2nd Update with much better control over dot counts)