Browser back button reloads entire movie - shared object?

Hi there,

I have trailed through endless forums and tried adding all the various codes people have given to try but with no luck. I would be so forever grateful if some bright person out there could help?

I have a movie that is embedded within a php page. The movie starts with an animation and at the end, an image emerges with buttons. The image that emerges is actually an xml run slideshow but I don’t want to complicate it with this bit of information if it is not relevant. So the film stops there and the buttons remain with a changing background.

I would like to make it skip to the end frame if it has been played before, if someone returns to the page, so that the user doesn’t have to watch the entire movie to get to the buttons.

I have tried adding this to the first scene however it is pretty temperamental:

var myCookie:SharedObject = SharedObject.getLocal(“checkFirstVisit”);

if (_root.getBytesLoaded() == _root.getBytesTotal()) {
// Flash Cookie
if (myCookie.data.didAlreadyVisit) {
_root.gotoAndPlay(505);
} else {
myCookie.setProperty(‘didAlreadyVisit’, true);
gotoAndPlay(2);
}
} else {
gotoAndPlay(1);
}

PLEASE help!?

Thanks in advance for any advice!