It's really, really easy. Go to the FlxG file and add a new import statement
// already here
import flash.display.BitmapData;
import flash.events.Event;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundTransform;
import flash.net.SharedObject;
import flash.net.URLRequest;
import flash.net.navigateToURL;
//add this
import flash.net.SharedObject;
Now add a single line into the instance variables
//this stuff is already here
//function reflectors
static private var _quake:Function;
static private var _flash:Function;
static private var _fade:Function;
static private var _switchState:Function;
static private var _log:Function;
static private var _setCursor:Function;
//add this line of code below it
static public var FlxSave:SharedObject = SharedObject.getLocal("userData");
This line of code will create a shared object if there isn't one there, and if there is one there it will copy it.
That's it. Your done, you now have a tiny little file sitting on everybody's computer who looks at your swf.
Now let me show you how to bend this file to your nefarious whims.
To access the file we go through FlxG into the FlxSave file and then we want to look at the data on the file, and then we specify the data name. Quite a long string but very easy to understand.
eg I have a variable called counter, I access it like this
FlxG.FlxSave.data.counter
Simple

There is only one more thing to note. When you are running your swf there will be two versions of FlxG.FlxSave. One is stored in your swf memory and one is stored on the computer. When we want to properly save data we simply use a function which says "Hey, computer, this is what that file should look like". This takes the file on the computer and makes it equal to the file in your swf memory.
Here's what it looks like
FlxG.FlxSave.flush();
Lets put this together into a little swf as an example:
http://www.swfcabin.com/open/1252735529Create a new swf with Flixel and add the pieces of code as above to the FlxG file and add the default cursor image, we'll want it later.
Now in the create a MenuState file, we create a little function which checks how many times this person has seen this swf, and increases to tally by 1.
Here's what it looks like
public function checksave():void
{
if (FlxG.FlxSave.data.counter == null)
{
FlxG.FlxSave.data.counter = 1;
} else {
FlxG.FlxSave.data.counter++;
}
FlxG.FlxSave.flush();
}
If the data we want isn't there, we create a new variable equal to 1. If it is there we increase the variable by 1. Then we save the data to the computer.
Now lets add a function to delete the saved information
public function wipesave():void
{
FlxG.FlxSave.data.counter = null;
FlxG.FlxSave.flush();
FlxG.switchState(MenuState);
}
We set the data to null, then save it to the computer.
Then we reload the state to reset the text. No text you say? Lets add some. Here's what the constructor looks like
public function MenuState():void
{
FlxG.setCursor(ImgCursor);
checksave();
this.add(new FlxText(0,80,FlxG.width,80,"You have visited this page\n" + FlxG.FlxSave.data.counter + " times",0xffffffff,null,16,"center"));
this.add(new FlxButton(120,160,new FlxSprite(null,0,0,false,false,80,16,0xff5f5f5f),wipesave,new FlxSprite(null,0,0,false,false,80,16,0xff898D8B),new FlxText(0,2,80,16,"Wipe data",0xffffff,null,8,"center"),new FlxText(0,2,80,16,"Wipe data",0xffffff,null,8,"center")));
}
We add a Cursor (so we can click the button), we check the save file, then we add some text saying how many times we've veiwed the page.
Lastly we add a button to wipe the data.
Here is the source file if you want to take a look:
http://www22.zippyshare.com/v/2541909/file.htmlFinally just some information. Each shared object is specific to a web address, that's why if you play a game on two different sites you will have 2 different saves.
Also shared objects are located outside the cookies folder, so they can only be deleted if someone really wants to delete then (you have to go through flash preferences)
You can stash pretty much any information you want to there, strings, number, arrays etc
I've probably missed one or two things, feel free correct me
