Thanks for your reply. I did submit this a while ago in the Flash Pro
forum and received like 100 views but no replies :(
First, we are the server and controller of the SWF - we are using
Flash not to display movies but for its storage capabilities in
connection with security tokens (I am just a developer - I didn't make
the architecture decisions :) Actually what I was looking for was an
approach through SWFObject which would "infer" local storage
availability or not. I have been trying to attempt create a
"cookiemanager" swfObject and then write a cookie and look at the
return value to determine whether successful or not. So far I am
having no luck - the return values are the same regardless of whether
the client has enabled or disabled flash local storage (getting false
positives). Here is code snippet:
var so = new SWFObject(flashyUrl, "cookiemanager", "0", "0",
"6", "#ffff00");
so.addParam("allowScriptAccess", "always");
alert("SO Write Result: " + writeResult.toString());
var cookiemanager = getFlashMovieObject("cookiemanager");
cookiemanager.SetVariable("/_level0:CookieName", cookieName);
cookiemanager.SetVariable("/_level0:CookieValue",
cookieValue);
cookiemanager.SetVariable("/_level0:call", "SetCookie");
var writeResult = so.write("FlashCookie");
var scRes = cookiemanager.GetVariable("/
_level0:setCookieRes");
if (scRes == "false") {
alert("Please unclick 'Never' button in flash local
storage settings dialog box \n and increase the memory size");
return false;
} else if (scRes == "pending") {
alert("Please increase disk space in flash local storage
settings");
return false;
} else if (scRes == "true" || scRes == cookieValue) {
return true;
} else {
alert("Error: "+scRes);
return false;
}
Any ideas of what I could do to fix or another approach to "infer"
whether local storage working on the client?
On Oct 17, 10:16 am, Aran Rhee <[email protected]> wrote:
> Detecting LSO availability is purely a function which can be determined from
> a swf. SWFObject (or javascript in general) has no hooks into determining
> the LSO settings for a particular site (normally LSO storage settings are
> determined on a per site basis) or globally (disabled totally by the user).
>
> Unless you are the site owner of where the swf is begin served from, you
> cannot access the LSO for that site anyhow...
>
> To test the capability of writing a LSO from with your Flash file like the
> example given on the Adobe livedocs
> page:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl...
>
> Anyhow, this topic is not really anything to do with SWFObject per se, so I
> would suggest you will find better help on the generalist Flash sites...
>
>
>
>
>
>
>
> On Mon, Oct 17, 2011 at 7:45 AM, swfNewbie <[email protected]> wrote:
> > I am new to SWF Object and Flash and have a need to detect whether or
> > not local storage is set to allow or not. The flash version is
> > detecting fine - not a problem. But not having any luck with
> > detecting a disabled local storage - what I have to do is downgrade to
> > use Javascript instead of Flash if the local storage is turned off. I
> > am using SWFObject 1.5 (cannot upgrade to 2). I have tried to write
> > test flash cookies (assuming I would get some kind of bad result if
> > storage turned off) but I always get the same result whether or not
> > local storage is enabled. Any help would be appreciated.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "SWFObject" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/swfobject?hl=en.
--
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.