Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Flash preloader question

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
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
Close
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
Close
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
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back