|
-
Can't skip intro if press back on browser
If you land on my site, there is a "Skip intro" button. Works fine unless you press back on the browser then come back to my site and try to skip intro. What could be cancelling the button's click code when returning to the site?
My site: www.mogulweb.com
Code on frame 1 (unrelated to button):
<code>
import mx.video.*;
stop();
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
gotoAndPlay(2);
};
my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.contentPath = "http://www.mogulweb.com/mogul_web_intro_1.flv";
</code>
code on button:
<code>
on (release)
{
gotoAndPlay(2);
}
</code>
-
Why would I not be able to press back on the browser then come back and not be able to skip the intro/frame1.
-
Prid - Outing
Nothing's odd here, everything's working fine. Do you mind stating the browser you use and also how to recreate the scenario for me to test?
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
Designer, Programmer, Musician
Hey nig, my friend, how you been!?
I think what musicismything tries to do is save a Shared Object (as the cookies in a browser), so when the user clicks on "Skip intro", and refresh the page, it redirects to the content and bypass the intro, so they don't have to keep clicking skip intro each time they load the page. If this isn't what you want to do, everything's working 100%, i click on skip intro and it does skip it each time.
musicismything if this is what you want, you have to create a Shared Object to save your variables and nig or I can help you with that. (In fact, I learned from nig)
Actionscript Code:
var saveState:SharedObject = SharedObject.getLocal("cookie");
if(saveState.data.skippressed != undefined){
skippressed = saveState.data.skippressed;
checkSkip();
} else { skippressed = false; checkSkip(); }
skipbutton.onPress = function(){ skippressed = !skippressed; saveState.data.skippressed = skippressed; checkSkip(); }
function checkSkip(){ if(skippressed == true){ gotoAndStop(Content frame or scene number or label); } else { gotoAndStop(Intro Screen); }
}
Hope this help. I haven't tested it with your case. Mine works. I have this Mute/unmute button, when the user clicks Mute, the music stops, and when the user refreshes the page, it remains muted.Then when they press Unmute, it plays agains, and same.
Last edited by angelhdz; 06-05-2012 at 09:28 AM.
Tags for this Thread
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
|