# Shared object - not advancing to correct frame

**URL:** <https://forum.kirupa.com/t/shared-object-not-advancing-to-correct-frame/216811>\
**Category:** Uncategorized\
**Created:** [February 20, 2007, 7:48pm UTC](https://forum.kirupa.com/t/shared-object-not-advancing-to-correct-frame/216811 "2007-02-20T19:48:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![benswift](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@benswift](https://forum.kirupa.com/u/benswift)\
**Post date:** [February 20, 2007, 7:48pm UTC](https://forum.kirupa.com/t/shared-object-not-advancing-to-correct-frame/216811/1 "2007-02-20T19:48:39Z")

</div>

here is a problem I have been fighting on and off for a while and never found an answer for. I have tried using this for about 3 different projects over the past year, and never gotten a satisfactory result. These are basically for using a flash header type navigation with a lead-in animation. I am using SharedObject to tell whether or not a user has seen the intro animation. Simple enough eh? Then I am using an “if” statement to advance it to a specific frame. This works 100% of the time in the authoring environment.

However, it does not work on the web. If I use a frame label, it does not advance. I can run a trace on it, and it will report the correct frame label, but it will not advance. If I use a frame number it will advance to somewhere around “frame number/2” and stop there.

Has anyone else encountered this problem?

here’s a clip of my code, myCookie\_so.data.intro is set to “done” later in the movie, and myCookie\_so.data.frame is set to “intro\_done”. this traces everything correctly in the authoring environment:

```auto
var myCookie_so:SharedObject = SharedObject.getLocal("myCookie_so_cookie", "/");
//

doCookie = function(){
	if (myCookie_so.data.intro == "done") {
	  gotoAndStop(myCookie_so.data.frame);
	 
	  trace(myCookie_so.data.intro);
	  trace(myCookie_so.data.frame);
	  trace("doCookie if");
	}
	else{
		myCookie_so.data.intro = "begun";
		myCookie_so.data.frame = "intro_begin";
		trace("doCookie else");
		
	}
}

doCookie();

```
