You need to know cookie concept in flash.
I will give you all the required necessary info so that you don't have to keep figuring out what is where? I know the code myself and could explain you what is going wrong where. But I dont have the time to do it.
More info in the PMB.