Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : SharedObject ---where is local object stored?


pazzoboy
5/8/2004 9:18:11 PM
Okay, so I have this:
_global.so=SharedObject.getLocal("blocks");
so.data.x=new Array(10);
so.data.y=new Array(10:
so.flush(10);

What I'd like to know is where "blocks" is stored? I couldn't find it in my
cookies folders. I'm just curious to see what the file looks like.
Jack.
5/8/2004 9:31:31 PM
a typical path for the .sol extension is -
Drive:\Documents and Settings\<name>\Application Data\Macromedia\Flash Player\

so.flush(10); /*this is equivalent to -
so.flush([ minimumDiskSpace ])
minimumDiskSpace -
An optional integer specifying the minimum
number of bytes that must be allotted for this object. */

hth
tralfaz
5/9/2004 9:23:30 AM
[quoted text, click to view]

Do you know what a SharedObject file is? It isn't a text file. That code
won't do it.
tralfaz

elemental .std
5/9/2004 1:51:03 PM
Hi this is a prototype function that will give you the oportunity to set the
location of your SharedObject files:

MMSave.getDirectory = function() {
var d = ASnative(302, 0)();
var i = d.lastIndexOf("/");
d = d.substr(0, i);
i = d.lastIndexOf("/")+1;
var chemin = new String(d.substr(0, i));
var barre;
for (i=0; i<chemin.length; i++) {
if (chemin.charAt(i) == "/") {
barre++;
}
}
barre -= 3;
var MyRoot = "";
for (i=1; i<=barre; i++) {
MyRoot += "..\\";
}
return MyRoot;
};

// now you've got the root. If you want to save on ie c:\myflash\test\ do

MyPath = MMSave.getDirectory();
trace(MyPath);
MyPath += "myflash\\desktop\\yourfilename.txt";
// with this you can save your object into your MyPath path..
SharedObject.getLocal(objectName , MyPath])

Best Regards
I
AddThis Social Bookmark Button