# Yeah yeah, Shared Objects

**URL:** https://forum.kirupa.com/t/yeah-yeah-shared-objects/214577
**Category:** flash
**Created:** [January 30, 2007, 9:04am UTC](https://forum.kirupa.com/t/yeah-yeah-shared-objects/214577 "2007-01-30T09:04:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Koos](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Koos](https://forum.kirupa.com/u/Koos)
#### Post date: [January 30, 2007, 9:04am UTC](https://forum.kirupa.com/t/yeah-yeah-shared-objects/214577/1 "2007-01-30T09:04:16Z")

</div>

I have read all the forums and tutorials on the net, but I cannot find a solution to my Shared Objects problem.

I have an animation in the main timeline, from frame 1 to 15.

I only want to let the user see the animation once. The second time he views it it should gotoAndStop at frame 15.

Now I figure Shared Objects would work but I’m having difficulty.

**Heres my code:**

**Frame1:**  
user = SharedObject.getLocal(“user\_profile”);

if (user.data.name == undefined){  
\_root.gotoAndPlay(2);  
} else {  
firstname = user.data.firstname;  
gotoAndStop(15);  
}

**Frame 15:**  
stop ();  
user.data.firstname = firstname;

Thanks guys. :hugegrin:
