-
Member
[as3][FD] Shared Object being given wrong name/odd text
Using Flash Develop, i'm using a bit of sharedobject code I've used in the past and had no problems with.. However, when I pass the name of the variable to be saved, it says that name in a corrupted way. the first character is always missing and has been replaced with a [] character at the end (white square).
as it's on the saving side, here is the setcookie function I use:
Code:
public static function setCookie(c:String, n:*, v:*):void{
//Saves a variable to Flash Cookie file
//AKA shared Object
//c is Cookie Name
//n is Variable Name
//v is Variable value
var mySo:SharedObject; = SharedObject.getLocal("Test1");
mySo.data[n] = v;
var StatusResults:String = null;
StatusResults = mySo.flush();
if (StatusResults != null){
}
}
should be easy to follow as it's not complex or anything. the n value is the name, so the shared object file should have a variable called whatever is in 'n', with the value of whatever is in 'v'.
I don't think it's a flash develop bug, nor do I think it's a code bug so.. i'm completetly lost.. tracing commands gives the variable name as being passed correctly and seams to be correct inside the data object
-
.
Hi,
The shared object file is stored encoded, so it will look something like so.
PHP Code:
¿ 6TCSO myName c_x- bw_xƒY c_y{ bw_y
that is a real *.sol file.
so you have nothing to worry about when you look at the file.
you should try loading the shared object to see what you have saved.
http://www.republicofcode.com/tutori...3sharedobject/
-
Member
yeah, I know they are encoded ^_^:
it seams the problem was with my Sol reader.. or more editor.. for some reason, it read the sol file wrong (normally it's pretty good), but the Reader with Develop reads it fine (just doesn't allow editing)..
so thanks but it all seams fine now for some reason.. well, not 100% fine but fine enough to work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|