-
Skip Intro indefinitely ?
Hey guys I just added a skip intro button to my sites intro page but how do I make sure that the intro doesn't run again (when they return) on the computer that asked to skip the intro? How would I go about doing this?
Thanks !
Learning the basics at the speed of Sight!
-
Prid - Outing
Use SharedObjects
Before the intro starts, type this on a Frame:
Actionscript Code:
skip_intro = SharedObject.getLocal("skip");
if(skip_intro.data.intro != undefined){ gotoAndPlay(100); // or change to something else, this is to skip the intro automatically } else { gotoAndPlay(2); // or change to something else, this is to PLAY the intro }
And on the intro button:
Actionscript Code:
on(release){ skip_intro = SharedObject.getLocal("skip"); skip_intro.data.skip = 1; gotoAndPlay(100); // or something else to skip the intro }
What it does, is that we create a .sol file on the player's computer, and save information inside it, and it will stay there regardless of closing the Flash and opening it again. We create a file named skip.sol, and when you press the button, it creates a value called skip inside it, containing the number 1, much like variables. And before the intro starts, we check if that value exists or not. If the button has been clicked, the value exists, this making the if statement trigger, to skip the intro, but if it doesn't, then the else statement is triggered, making it play the intro. Hope it's helpful
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|