Skip to content


[AS 3] Shared Object between Multiple SWF Files

I have been working on my .mp3 player that requires two .swf movies, one to play the music and another to control it (like a remote control to your stereo). This implementation is required so as the user navigates from one page to another the music will not be interrupted. The good thing is that the SharedObject can be retrieved by other movies if you use a line of code such as:

_so = SharedObject.getLocal(”SharedObjectID”,”/”);

One thing to be careful of is to not allow the ability of other .swf movies (other than your own) to retrieve/edit/delete this object.

Posted in Actionscript 3, Data Sharing.


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Bryson Whiteman says

    Thanks for this bit of code! I couldn’t find anything that said the “/” would work in AS3.

  2. narayana says

    its fine.but i have doubt with out crud operations object will be waste right…just for seeing page only its use.but i want to store images in shared object. when ever browser refresh that time again display what ever last changes same as can u do that . if u know please mail to my id is narayana49@gmail.com

  3. narayana says

    i have images in two list .if i drag and drop that two images after browser refresh also i want last changes to dispaly using shared object concept,how ? if u know please mail to me my id is narayana49@gmail.com



Some HTML is OK

or, reply to this post via trackback.