FORUMS: list search recent posts

Can you overide a preloader with a skip button?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jcarty
Can you overide a preloader with a skip button?
on Feb 3, 2006 at 6:29:58 pm

I'm designing a homepage with some fairly hefty animation on it.

I've created a simple animated preloader that should keep first time visitors entertained for the 10 seconds or so the homepage needs to load.
I also added a "skip" button to the preloader so that clients who visit the site regularly can go directly to an alternative "client" page that has no animation.

The problem I'm having is that the "skip" button is unresponsive for most of the time the preloader is doing its thing. And when it finally does take you to the "client" page, (sometime just before the preloader is 100% loaded) nothing on the client page works. (No button control ect.)

Can someone can tell me how to do this correctly? I'm hoping to avoid having to put up a page that asks the viewer to choose before the preloader begins.

Below is the preloader code I'm using, in case it helps.

var total = _root.getBytesTotal();
var loaded =_root.getBytesLoaded();
total_percent = (loaded/total)*100;
_root.loaded_text = Math.round(total_percent)+"%";

if (loaded>=total) {
gotoAndPlay("homepage", 1);
}

Thanks in advance for your help.

jcarty



Return to posts index

lajoiet
Re: Can you overide a preloader with a skip button?
on Feb 3, 2006 at 7:33:48 pm

Where is your skip button and what is it doing?

If it is sending the user to another frame or scene in the flash file, it's entirely likely that flash has not fully downloaded the file and you are trying to send them forward to a place that is not there yet.


Return to posts index

jcarty
Re: Can you overide a preloader with a skip button?
on Feb 5, 2006 at 2:51:22 pm

The skip button is on a layer on the preload page as an instance with the script applied to the button instance.


on (release) {
gotoAndStop("client",1);
}

I was hoping by sending a viewer to a different area of the site, which has nothing on it but a few lines of text, that I could bypass the now unessecary "homepage" frames that the preloader was busy loading.



Return to posts index


Sher Ali
Re: Can you overide a preloader with a skip button?
on Feb 4, 2006 at 8:57:00 am

let say your code is inside on the first frame of the main timeline
then you can do this.

_root.onEnterFrame = function(){

var total = _root.getBytesTotal();
var loaded =_root.getBytesLoaded();
total_percent = (loaded/total)*100;
_root.loaded_text = Math.round(total_percent)+"%";

if (loaded>=total) {
gotoAndPlay("homepage", 1);
}


}

skipBtn.onRelease = function(){

_root.onEnterFrame = null;
_root.gotoAndStop("mainSection");

}


hope it helps.

Sher Ali,
Interactive Media Developer


Return to posts index

jcarty
Re: Can you overide a preloader with a skip button?
on Feb 5, 2006 at 2:41:08 pm

I added the code you suggested but I'm afraid it's not working.

The button does not respond when pressed, and when I let the preloader finish loading, it proceeds to the homepage as it should, but doesn't advance past frame1.

Am I correct in assuming the "skipBtn" is the instance name of the button I have, and all the code should reside in frame 1 of the actions" layer with no script on the button instance itself?



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]