NameSilo

Flash preloader question

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Watch

bdd

Established Member
Impact
1
hi i have a preloader on my flash for my site... but i want to know if there is any script i can add to the preloader to actually test whether the whole page has finished loading before it starts playing the movie? otherwise ppl on broadband will usually get the movie playing a couple of seconds before the page has finished loading...

cheers
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
You can make that !

Code:
/////////////////////////////////////////////////////////
_root.txtProzent._visible = 0;
_root.balken._visible = 0;
_root.createEmptyMovieClip("container", 10);
_root.container._x = 50;
_root.container._y = 50;
/////////////////////////////////////////////////////////
extern_laden = function (clip) {
	_root.container.loadMovie(clip);
	_root.createEmptyMovieClip("control", 20);
	_root.txtProzent._visible = 1;
	_root.control.onEnterFrame = function() {
		if (_root.container.getBytesLoaded()>=4) {
			_root.balken._visible = 1;
			_root.container._visible = 0;
			gesamt = _root.container.getBytesTotal();
			bereits = _root.container.getBytesLoaded();
			prozent = Math.ceil((bereits/gesamt)*100);
			_root.txtProzent.text = prozent+"%";
			_root.balken._xscale = prozent;
			if (prozent == 100) {
				_root.container._visible = 1;
				_root.container.gotoAndPlay(2);
				_root.txtProzent._visible = 0;
				_root.balken._visible = 0;
				delete this.onEnterFrame;
			}
		}
	};
};
//////////////////////////////////////////////////////////
 extern_laden("yourfile.swf"); 
//////////////////////////////////////////////////////////
 MyMC.removeMovieClip();
 
0
•••
woah.... so what exactly does all that do... that seems like alot of script...

or...

would some javascript in the html work better?
 
Last edited:
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Truehost — .com domains from $4.99, hosting includedTruehost — .com domains from $4.99, hosting included

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back