00:00
00:00
Newgrounds Background Image Theme

Chan99 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

White screen of death (preloader)

564 Views | 9 Replies
New Topic Respond to this Topic

White screen of death (preloader) 2014-08-24 13:26:46


I'm working on a little game, but my preloader gets the white screen 'til about 85%, even though the file size is really small, I really don't want to have to put up with the whiteness. When I simulate download the results are the same.

.sfw = http://www.newgrounds.com/dump/item/f55c55059d9b3bcbec03c08c492ab739

Response to White screen of death (preloader) 2014-08-24 13:34:09


At 8/24/14 01:26 PM, GrahamNG wrote: I'm working on a little game, but my preloader gets the white screen 'til about 85%, even though the file size is really small, I really don't want to have to put up with the whiteness. When I simulate download the results are the same.

.sfw = http://www.newgrounds.com/dump/item/f55c55059d9b3bcbec03c08c492ab739

I forgot to add the code.

stop();
addEventListener(Event.ENTER_FRAME, frameChecker1);
function frameChecker1(event:Event):void {
trace("Frame entered.");
var loaded:Number = this.loaderInfo.bytesLoaded;
var total:Number = this.loaderInfo.bytesTotal;
var percent:Number = loaded/total;
var percentRounded:uint = percent * 100;
loadingBar.scaleX = percent;
textLoading.text = percentRounded + "%";
if (total == loaded) {
buttonPlay.alpha = percent;
}
else {
buttonPlay.alpha = percent/2;
}
if (total == loaded) {
removeEventListener(Event.ENTER_FRAME, frameChecker1);
}
}
buttonPlay.addEventListener(MouseEvent.CLICK, playClick);
function playClick (event:MouseEvent){
play();
}

Response to White screen of death (preloader) 2014-08-24 13:49:52


If you export everything into the first frame, it will load before your preloader is displayed.

Response to White screen of death (preloader) 2014-08-24 13:59:26


At 8/24/14 01:49 PM, milchreis wrote: If you export everything into the first frame, it will load before your preloader is displayed.

Can you explain that please? How would I change that? Also, when I use an image to buff up the file size the white screen only occurs for about 2% (Which I can deal with).

Response to White screen of death (preloader) 2014-08-24 14:05:22


At 8/24/14 01:59 PM, GrahamNG wrote:
At 8/24/14 01:49 PM, milchreis wrote: If you export everything into the first frame, it will load before your preloader is displayed.
Can you explain that please? How would I change that? Also, when I use an image to buff up the file size the white screen only occurs for about 2% (Which I can deal with).

I just went through and made it export on every other frame, but it didn't help. It seems it always loads 7kb before showing the preloader.

Response to White screen of death (preloader) 2014-08-24 14:37:18


At 8/24/14 01:59 PM, GrahamNG wrote: It seems it always loads 7kb before showing the preloader.

You are aware that it has to load the loader before it can display it?
Before it can display a frame, it has to load the entire content of that frame.

Response to White screen of death (preloader) 2014-08-24 16:28:10


At 8/24/14 02:05 PM, GrahamNG wrote: I just went through and made it export on every other frame, but it didn't help. It seems it always loads 7kb before showing the preloader.

Does this link help?
http://www.newgrounds.com/bbs/topic/1360598#bbspost24975514_post_text

Response to White screen of death (preloader) 2014-08-24 21:06:49


At 8/24/14 04:28 PM, Etherblood wrote:
At 8/24/14 02:05 PM, GrahamNG wrote: I just went through and made it export on every other frame, but it didn't help. It seems it always loads 7kb before showing the preloader.
Does this link help?
http://www.newgrounds.com/bbs/topic/1360598#bbspost24975514_post_text

are all of your sounds set to export in first frame? if so try setting that off for all of them. then making a movie clip in the second frame and add enough layers to its timeline to add all the sounds. then put a stop(); on the first frame. thisshould make the preloader load the sounds

Response to White screen of death (preloader) 2014-08-24 22:15:44


I forgot to add the code.

stop();
addEventListener(Event.ENTER_FRAME, frameChecker1);
function frameChecker1(event:Event):void {
trace("Frame entered.");
var loaded:Number = this.loaderInfo.bytesLoaded;
var total:Number = this.loaderInfo.bytesTotal;
var percent:Number = loaded/total;
var percentRounded:uint = percent * 100;
loadingBar.scaleX = percent;
textLoading.text = percentRounded + "%";
if (total == loaded) {
buttonPlay.alpha = percent;
}
else {
buttonPlay.alpha = percent/2;
}
if (total == loaded) {
removeEventListener(Event.ENTER_FRAME, frameChecker1);
}
}
buttonPlay.addEventListener(MouseEvent.CLICK, playClick);
function playClick (event:MouseEvent){
play();
}

Start putting your code inside of the code tags dude. I know you are new to it so don't worry everyone does it at first. Whenever you want to add code put it between the code tags. When making a post (or reply) you will see them to the left of the text box you use to type your message. They are located at the very bottom of the tags.

By placing your code between the two code tags your code will appear much more readable - which will make it way easier for us to read your code and help you.

Here is what your code you posted will look like using the code tags:

stop();
addEventListener(Event.ENTER_FRAME, frameChecker1);
function frameChecker1(event:Event):void {
trace("Frame entered.");
var loaded:Number = this.loaderInfo.bytesLoaded;
var total:Number = this.loaderInfo.bytesTotal;
var percent:Number = loaded/total;
var percentRounded:uint = percent * 100;
loadingBar.scaleX = percent;
textLoading.text = percentRounded + "%";
if (total == loaded) {
buttonPlay.alpha = percent;
}
else {
buttonPlay.alpha = percent/2;
}
if (total == loaded) {
removeEventListener(Event.ENTER_FRAME, frameChecker1);
}
}
buttonPlay.addEventListener(MouseEvent.CLICK, playClick);
function playClick (event:MouseEvent){
play();
}

Response to White screen of death (preloader) 2014-08-25 06:43:59


are all of your sounds set to export in first frame? if so try setting that off for all of them. then making a movie clip in the second frame and add enough layers to its timeline to add all the sounds. then put a stop(); on the first frame. thisshould make the preloader load the sounds

I haven't even got around to doing sounds yet :P