Ok, I understand what you are trying to achieve (having worked as a dev in
digital/advertising for over a decade I have done my fair share of
cookie/LSO/behavioral tracking implementations).


As to what you are trying to achieve I think you will want to look at
implementing ExternalInterface as your communication method as it allows for
better comms between js and swf over set/get variable.

I would go about the manager in a few steps:

1) block access to flash storage on a dev server location
2) inside your swf, try to write and LSO to the dev server. You should get a
failure etc.

(here is a good article (AS3) which shows all the error handling etc - uo
can modify it bacl to AS2 pretty easily if you require a lower FP version -
http://drawlogic.com/2008/01/10/howto-sharedobjects-for-local-storage-as3/ )

3) expose the writing / reading methods through ExternalInterface and call
the methods you want from javascript.


Note - This is not really the right forum for this stuff however as it is
not actaully SWFObject related. A generalist Flash forum like kirupa or
actionscript.org will have more people willing to offer suggestions.


Cheers,
Aran


On Thu, Oct 20, 2011 at 7:41 AM, swfNewbie <[email protected]> wrote:

> 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.
>
>

-- 
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.

Reply via email to