Skip Intro Script
- Started
- Last post
- 5 Responses
- Buckyball2
I'm asking on behalf of a coworker so here go's:
She wants to put in a script that plays the flash intro when you first come to the site but that everytime after that it auto skips the intro and goes straight to the main page.
I believe it has something to do with calling a cookie and maybe some javascript.
Just looking for the easiest way to achieve this.
thanks.
- jpolk0
local shared objects are your friend...
- Buckyball20
thanks j. how reliable are those across multiple browsers/platforms?
- ********0
100%
LSOs are stored in the user profile of the computer. Not in the cache or history folders, therefore they exist perpetually.
only time it doesn't work is if the same user switches computers.
- Buckyball20
Okay so found an example script on macromedia but it was for a name field that counts the number of times you been there. Not exactly what we need. Found another one here:
http://www.kirupa.com/developer/…
Very similar. How do we customize this SO script to only remember if someone has been to the site before so it will either skip an intro or go to a particular frame?
thanks
- Buckyball20
found this script which I believe is what we need. What do I change on this besides the gotoandPlay frame to skip the intro?
//initialize the shared object – get it if it exists on this computer
var my_so:SharedObject = SharedObject.getLocal("visited", "/");//check to see if the visited info object exists and act accordingly
if (my_so.data.newVisitor != undefined) {
//object exists: return user
//replace "frame-for-return-user" with the frame number that skips your intro animation
this.gotoAndPlay(frame-for-retur...
} else {
//object doesn't exist: new user
//set the newVisitor attribite of the my_so.data object to indicate this is not a new visitor next time they come to the site
my_so.data.newVisitor = "no";
this.play();
}