Quick question on File I/O - not sure if FramerJS supports this:- how would I read/write json, text and binary files? - what if the file is on a server, or I have to ask the user to pick one?Any examples utmost appreciated!
I know how to read. But not write. It might be possible with CS.
They are running a server to serve up the pages locally. So you might be able to tie into that...
And apparently both mobile safari and chrome are supporting the JS FileReader API so there is hope. Not sure if this is the best path or something better supported by Framer JS...
It'd probably be best for framer studio to just bake the files into the generated js file. Cross browser file support is fraught with peril
Reading json-files is easy:
path = "/whatever.json"json = JSON.parse(Utils.domLoadDataSync(path))
To encode a string into json use JSON.stringify(string)
I can PM you an example if you want to.
So yeah I might get away with simply JSON for one part. What I want to do is:- have multiple versions of a prototype through an external text config file (json is ok here)- read and write image files (specifically 9-patch PNGs from Android), using a canvas element to get at the bits