Goto and Play won't take me where needed

hi, i have a flash animation which consits of images going up and down and text (done in cs4). it is for a website and i want the animation to continue playing where it left if the link on the page is changed (the animation is on every page) so i used this code:

import flash.net.SharedObject;
var mySo:SharedObject;

mySo = SharedObject.getLocal(“lifebanner”);
if (mySo.data.tst>1) {
this.gotoAndPlay(mySo.data.tst);
}

this.addEventListener(Event.ENTER_FRAME, onEnter);
function onEnter(e:Event):void {
mySo.data.tst = currentFrame;

}

it works fine with the 1st 240 frames, where there’s 2 sets of text and 2 images. By works fine i mean if i switch it of and on again the animation doesn’t start over but continues from where i switched it off. Now my problem is that on frame 240 is another image going up and if i close the movie anywhere after 240 it still starts at 240.

I checked the mySo.data.tst it works fine (picks up the number of frame) but for some reason it doesn’t play it, just jumps back to 240.

Please help, Thanks.