Paratrooper Digital

Problem with shared objects not saving.

Recently on a project we experienced and interesting occurence. We were using a shared object to store the state of a user seeing a global introduction. After seeing it once, the shared object saves a value and the user never sees the introduction again; nothing earth shattering.

In this circumstance it seemingly unexpectedly just stops working, consistently but across different pages within the same environment.

One page had a path that looked like…

while the other…

Almost completely the same locations, except for the double slash.

Play your swfs in any browser and there’s normally not any issues; two slashes in the path or not. Sometimes the team has an extra slash due to variables sometime having a trailing forward slash in different situations in different configurations based on domains. Add a set of calls to a shared object to the same swf and they will start failing.

Whats the reason?

If you’ve ever looked up a shared object file on your computer and seen how they are stored, you’ll see that they are stored in a domain folder and then in a series of folders that emulate the path of the swf on that server. An extra slash fails to create the extra folder in the swf path and the saving and retrieving fails.

So if you are using shared objects make sure that your paths do not contain additional slashes.


Note that the localPath option may provide a way to also locate a shared object so you can still enter a double slash in your path. I haven’t tested this, but found it later while looking through the documentation for something else.

About Nate Frank

Nate is currently a Senior Presentation Layer Architect at Razorfish Chicago. As an SPLA Nate: participates in technology leadership team and resource allocations, manage fulltime and contractor resources, represents technology for groups of brands across multiple clients, furthers development of standards within the office, architects project implementations and fosters community and mentoring.

View all posts by Nate Frank

Most recent posts