Flash Preloader

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
FUSED
Registered User
Posts: 1601
Joined: 29 Sep 2004, 02:00
Location: Seker nie ver nie?
Contact:

Flash Preloader

Post by FUSED »

Hey guys

I'm busy building a AS2 flash site and all has gone well until I tried to build the preloader.

The problem is that the preloader progress bar runs, but finishes to soon. Then you end up looking at a static progress bar for about 10 seconds (depending on line speed), before it continues to the main movie. So I am guessing that the preloader is not loading the entire site as is represented by the progress bar, but loads the remainder of the site after the progress bar has completed. Hope this makes sense!

The script I'm using:

Code: Select all

stop();
mask_mc._width = 1;
this.onEnterFrame = function() :Void  {
	var loadedData:Number = this.getBytesLoaded();
	var allData:Number = this.getBytesTotal();
	var percent:Number = Math.round(loadedData/allData*100);
	mask_mc._xscale = percent;
	if (loadedData == allData) {
		gotoAndPlay(3);
		delete this.onEnterFrame;
	}
};

So how do I get rid of the delay between the finish of the preloader and the main site playing.

Hope someone can help, I've been searching for a solution for a week now.


Thanks in advance!
Image
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Flash Preloader

Post by DarkRanger »

Quick question: Why are you doing it in AS2 and not AS3?

I can't really see something wrong though...
Image
Post Reply