How to use SharedObjects

04:04 AS3 FLA 9

Act now while we have available seating

Our on line school is private, affordable and interactive with trainer support.
Act now save your seat before someone else takes yours.
Act now

What is A SharedObject? | Where are the as3 sharedObjects? | When should you use sharedObjects?

What is a SharedObject

The SharedObject class is used to read and store limited amounts of data on a user's computer or on a server. Shared objects offer real-time data sharing between multiple client SWF files and objects that are persistent on the local computer or remote server. Local shared objects are similar to browser cookies and remote shared objects are similar to real-time data transfer devices. To use remote shared objects, you need Adobe Flash Media Server.

In this video

By the end of the video you will have a familiarity as3 SharedObjects and will know how to save and read information from the users local computer. We will go over some of the new features introduced into SharedObject and flash player in resent months. Practice a Basic example of storing information and reading it.

If the operating system supports the requested locale, the properties and currency type are set according to the conventions and defaults of the requested locale. If the requested locale is not available, then the properties are set according to a fallback or default system locale, which can be retrieved using the actualLocaleIDName property.

Due to the use of the user's settings, the use of formatting patterns provided by the operating system, and the use of a fallback locale when a requested locale is not supported, different users can see different formatting results, even when using the same locale ID.

SharedObject files Location:

The default storage location for Local Shared Objects is operating system-dependent.

On Microsoft Windows based OS:

  •  %APPDATA%MacromediaFlash Player#SharedObjects
  •  %APPDATA%MacromediaFlash Playermacromedia.comsupportflashplayersys

On Mac OS X, they are stored in:

  • ~/Library/Preferences/Macromedia/Flash Player/#SharedObjects/
  • ~/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/

On Linux or Unix, they are stored in:

  • ~/.macromedia/Flash_Player/#SharedObjects/
  • ~/.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys/

For Linux and Unix systems, if the open-source Gnash plugin is being used instead of the official Adobe Flash, they will instead be found at:

  • ~/.gnash/SharedObjects/
(Taken From Wikipedia)

When should you use SharedObjects?

SharedObjects are perfect when you need to store user information and have no database. This information is not shared with anyone but the user. Son an example is remmber the users name without the user needing to register to your site. There are many fun places where you can used shared objects. Save the last time the user was on the page and provide custom experiences based on how often a user comes to your flash area. The sky really is the limit and your creativity. Throughout we are focusing on AS3 this is true for AS2 so you should be capable of doing very similar actions as the above.


Our free content is sponsored by these ads become a prime member and get rid of them.

Act now while we have available seating

Our on line school is private, affordable and interactive with trainer support.
Act now save your seat before someone else takes yours.
Act now