I've been trying to make an in-game level editor for my HaxeFlixel game, but I'm having some difficulty just saving and loading a text file!
It would be easy if I was using the windows or neko targets because there's a whole package, sys.io, with things like File.loadContents to do that for me, except those packages are disabled for the flash target for some reason -_-
It would be nice if I could just use the Windows target to compile to, except it seems so utterly hideous to use, with random compiler errors that disappear when I recompile, and things like FlxCamera.buffer (which I would really like to have for a mirror effect) just don't seem to exist in it...
So I'm trying to use the flash target. There seem to be various methods of LOADING text files - URLLoaders and Assets.getText being the easiest looking ones - but I can't find any way of WRITING the text file again when I've finished editing...
This is probably a stupid question; I came to Haxe from C# and virtually no knowledge of AS3 so I don't know these things, and google has been useless for once
EDIT: FileReference looks like it might be good. Am I looking in the right direction?
EDIT #2: FileReference seems to work. It's probably really hacky and I have no idea what this will do to my embedded assets but it seems to work for now...
For anyone reading this,
this is the article that cracked it for me.