Question

I'm currently reading and writing data to a sol file using AS3 for my chat client. I'm having it read/write the sol file using the localpath param as "/" with no problems.

The issue is this:

If flash data is set from a swf on www.domain.com, the sol file doesn't exist for same swf loaded on domain.com. -And vice versa.-

I've extensively searched the Adobe help and api docs, and I can't seem to find a way to make it check for an exact path no matter if the www is prepended or not.

Is it even possible to do so, or would I be better off to redirect all requests to either use/not use the www so that it persists across the requests? Or should look more into getRemote?

Was it helpful?

Solution

[Note: I moved my comment here as an answer.]

Setting Security.exactSettings to false before accessing SharedObject (via the .getLocal() method) will make the player use the settings that player version 6 used, which is explained in documentation like:

In Flash Player 6, the domain used for these player settings was based on the trailing portion of the domain of the SWF file. If the domain of a SWF file includes more than two segments, such as www.example.com, the first segment of the domain ("www") is removed, and the remaining portion of the domain is used: example.com. So, in Flash Player 6, www.example.com and store.example.com both use example.com as the domain for these settings. Similarly, www.example.co.uk and store.example.co.uk both use example.co.uk as the domain for these settings. In Flash Player 7 and later, player settings are chosen by default according to a SWF file's exact domain; for example, a SWF file from www.example.com would use the player settings for www.example.com, and a SWF file from store.example.com would use the separate player settings for store.example.com.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top