all groups > macromedia flash flashcom > august 2007 >
You're in the

macromedia flash flashcom

group:

Persistent Shared Object not being persistent


Persistent Shared Object not being persistent Milks808
8/3/2007 12:00:00 AM
macromedia flash flashcom:
hi


my fms app maintains a persistent shared object to keep track of daily
highscores, however whenever the app is reloaded or restarted all the data from
the shared object is lost.

This is my SSAS:
this.todaysbest_so = SharedObject.get("todaysbest", true);

it seems like it should be so simple to implement, I can't see where it could
be going wrong.

I've matched the persistence parameter when the client gets the remote object
too:
this.todaysscores = SharedObject.getRemote("todaysbest", comms.uri, true);

any tips/ideas?

Thanks
Re: Persistent Shared Object not being persistent JayCharles
8/3/2007 12:00:00 AM
Re: Persistent Shared Object not being persistent Glen Gummess
8/3/2007 8:22:01 PM
I am having a similar problem. I created an app that works like a champ on
Flash Media Server, running on a Windows 2000 platform. But when I run the
same app on a Linux platform, neither a new instance nor the shared object is
saved.

Here is the code I'm using. Like I said. Works on Windows 2000; not on Linux.

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://localhost/appname/appinstance");
var my_so:Object = new Object();
nc.onStatus = function(info) {
trace(info.code);
my_so = SharedObject.getRemote("cuz", nc.uri, true);
my_so.connect(nc);
};
/// I enter a string in an input field and send it to a data slot for my_so.
input_txt.onChanged = function() {
my_so.data.myinfo = input_txt.text;
};
/// the onKillFocus event makes sure the information is saved.
input_txt.onKillFocus = function() {
my_so.data.myinfo.flush();
/// the output text shows the information I entered into input_txt.
output_txt.text = my_so.data.myinfo;
};

Like I said, it works in Windows... but not on Linux. Could anyone give me
some advice?

Glen Gummess
Instructional Designer
University of St. Francis
Joliet, IL

Re: Persistent Shared Object not being persistent Milks808
8/6/2007 2:42:56 PM
I'm running linux here and it seems having done some further reading, this
could be the source if the issue, and quite possibly read/write permissions.

I get:
Failed to open shared object file (/so path) for write.
traced in the fms console window, I'll have a word with our server chap when
he gets out of a meeting and see what he says
Re: Persistent Shared Object not being persistent Glen Gummess
8/6/2007 3:03:56 PM
My friend, your experience in getting this message: "Failed to open shared
object file (/so path) for write." is the same thing I am experiencing. I very
much look forward to the outcome of your meeting with the "server chap"!

Thanks,

Glen
Re: Persistent Shared Object not being persistent Milks808
8/6/2007 4:13:45 PM
server chap fixed it in no time

FMS was accessing the folder as one user, however the owner of that folder was
set to another user

changing the owner of the folder to that of the user used by FMS solved the
problem (though being a stranger to linux I couldn't tell you the exact steps
to do this)

hope this helps
AddThis Social Bookmark Button