[as3] Share Objects only working locally

Howdy!

I’m having problems with Shared Objects. They seem to work on my machine but when I put them on a server they’re not working anymore.

Basically I have a page with a video player and I only want the video to play when the user visits the page for the first time.

This is the code:


var beenVisited:Boolean=false;
var shared:SharedObject= SharedObject.getLocal("visited");
if (shared.data.visits==undefined) {
    shared.data.visits = 1;
    beenVisited=false;
    player1.play();
}
else {
    shared.data.visits ++;
    beenVisited=true;
    player1.stop();
}
shared.close();

I have tried deleting the .sol file and it didn’t change anything.

Any encounter this problem before?

I’ve tested with Firefox and Chrome. My version of Flash Player is 10.