Hi,
You can allow all swfs from a domain to read/write to same SharedObject,
There is second parameter to SharedObject.getLocal(..,..) method. Read about
in docs.
var so = SharedObject.getLocal('myCookie', "/");
This way all swfs in same domain have access to myCookie SO...But remember
there name collision issues, so read the docs properly...
http://livedocs.macromedia.com/flex/15/flex_docs_en/00001668.htm
-abdul
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 15, 2005 1:54 PM
To: [email protected]
Subject: [flexcoders] Re: any ideas about flex client side caching?
HI,
I tried SharedObject. It is perfect. But I ocurs another problem. Only
the same swf can read the cache context.
For example:
I write a simple mxml file: test1.mxml:
<mx:Script>
<![CDATA[
function save(){
var so= SharedObject.getLocal('myCookie');
var str:String = text.text;
so.data.string = str;
var sucess:String = so.flush(1000000000);
alert(sucess);
}
function ini(){
var so= SharedObject.getLocal("myCookie");
var str:String = so.data.string;
alert(str);
}
]]>
and in text2.mxml:
function ini(){
var so= SharedObject.getLocal("myCookie");
var str:String = so.data.string;
alert(str);
The results in the two are different.
when browsing http:\\....\\text2.mxml, I find that the alert shows
blank while rebrowsing http:\\text1.mxml, I find the alert shows some
letters I saved.
Am I do something wrong?
--- In [email protected], Matthew Shirey <[EMAIL PROTECTED]> wrote:
> Just be careful about how much you store in the SharedObject. By
default the
> client is set to accept up to 100k A 'Huge' dataset might exceed
that. If
> you exceed that about I think the client then asks the user if more
space
> can be allocated. I've just started using a SharedObject; I'm a little
> paranoid about asking users wierd questions, so I'm trying to keep
it fairly
> limited.
>
> -- Matthew
>
> On 4/14/05, Abdul Qabiz <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi,
> >
> > You can cache object on client in SharedObject. So you can
serialize a
> > class
> > to SharedObject on client and later deserialize to use in application.
> >
> > For example, you fetch a huge dataset from server(via xml, http or
> > remoteobject), you can serialize it to SharedObject and show a
part of it
> > in
> > front-end when required. This way you can avoid network calls and
memory
> > problems...
> >
> > -abdul
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, April 14, 2005 10:33 AM
> > To: [email protected]
> > Subject: [flexcoders] any ideas about flex client side caching?
> >
> > Hi,all,
> > In Christophe's blog, we can code our own class to
> > cache data. Does flex provider some other solutions
> > for the client_side caching?
> >
> > Best Regards
> > Feng
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > 150����MP3����ѣ������������ֵ���
> > http://music.yisou.com/
> > ��Ů����Ӧ�о��У��ѱ���ͼ����ͼ�Ϳ�ͼ
> > http://image.yisou.com
> > 1G����1000�ף��Ż������������ݣ�
> >
> >
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1
> > g/
> >
> > Yahoo! Groups Links
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/