SWF-Capabilities Demo


SWF-Capabilities is a small Flash application which enables webmasters through its Javascript API to utilize Flash's Local SharedObject (Flash Cookies). This webpage demonstrates these JavaScript API functions in use. You can use this webpage as a guide to help you understand how SWF-Capabilities works.

Important

The object name, capabilities, is created automatically by SWF-Capabilities. There is no need for you to create this object.

Example: capabilities.cookies_accepted()


Cookie Test

capabilities.cookies_accepted() detects if a user is accepting Flash cookies. Press the button below to test this function on your system.


System Capabilities

capabilities.get_capabilities() fetches the user's system capabilities or serverString. Press the buttons below to test this function on your system.

capabilities.get_capabilities('serverString')


capabilities.get_capabilities(true)


capabilities.get_capabilities(false)


capabilities.is_match([object Object])

Set Cookie

capabilities.set_cookie(), capabilities.get_cookie(), and capabilities.unset_cookie() allow you to manage custom Flash cookies which persist until either you change them, or until the user deletes them. Press the buttons below to test this function on your system. The Cookie Name and Cookie Value below are fixed for this demo only. Normally, these values are customizable.




capabilities.set_cookie('', '')


capabilities.get_cookie('')



capabilities.unset_cookie('')

Set Random Key

capabilities.set_key(), capabilities.get_key(), and capabilities.unset_key() allow you to generate, fetch, or delete a randomized Flash cookie (key) which can then be utilized in situations such as form submission validation, user id, tracking, etc.. The key cookie will have a randomized name and value. The value can be a custom length and can consist of any characters you select. You decide how this feature can be helpful to you. Press the buttons below to test this function on your system.

capabilities.set_key(150,"abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789")


capabilities.get_key()


capabilities.unset_key()
SWF-Capabilities ©2011 Jason Lau
GNU/GPL GNU General Public License