actionscript-3apache-flexflex4flex4.7

Flex how to set Global Storage Settings to unlimited programatically


Does anyone know how to set Global Storage Settings to unlimited programatically? Thanks


Solution

  • You can't. The GLOBAL settings must be configured by the user (It's a permission issue).

    However, best practice would be to ask the user for permission to increase how much storage is allowed by your Flash app. This is achieved using:

    SharedObject.flush(minDiskSpaceBytes:int = 0)
    //Where the argument is how much space you anticipate ever needing
    

    Check out the Adobe reference

    Lucky for you, that request works on a domain level, so all Flash files hosted on that domain will also receive permission. In a sense, that IS the global setting.