One thing you may want to look into is a program like web speed simulator. http://www.xat.com/wo/index.html I use it to test preloaders all the time and it works great allowing you to test locally as if it were uploaded. And you can test at different connection speeds. Ryan
-----Original Message----- From: [EMAIL PROTECTED] on behalf of Andy Johnston Sent: Mon 3/20/2006 4:31 PM To: Flashcoders mailing list Cc: Subject: Re: [Flashcoders] preloader, again (ugh) G'Day Edward, Heres my code for a preloader. I use the movieClipLoader for good call backs and now onEnterFrame functions (sooo flash 5 ;)) var mcl:MovieClipLoader = new MovieClipLoader(); var loadingListener:Object = new Object(); mcl.addListener(loadingListener); var target_mc = this.createEmptyMovieClip(loadClipInstance, loadClipDepth); loadingListener.onLoadStart = function(target:MovieClip) { // starting load }; loadingListener.onLoadProgress = function(target:MovieClip, loadedBytes:Number, totalBytes:Number) { progressBar._xscale = (loadedBytes/totalBytes)*100; }; loadingListener.onLoadInit = function(target:MovieClip) { // stuff is loaded }; mcl.loadClip(loadClipPath, target_mc); you can only test preloaders on a live website.. testing locally or within flash will not work, so upload your stuff to a server and test it out. cheers andy >So you guys tell me that a single frame, single file site with a preloader 100% dynamic is pretty much impossible, ok i accept that. here is my external preloader, any ideas ... site loads, no progress appearance at all. > >// begin code >// ------------------------- >// text formats section >var format1_fmt:TextFormat = new TextFormat(); >with (format1_fmt) { > color = 0xFFFFFF; > font = "swfitslim99"; > size = 8; >}; >// ------------------------- >function preloader() { > // create movieclip to load swf in > _root.createEmptyMovieClip("target_mc", this.getNextHighestDepth() ); > _root.target_mc.loadMovie("site.swf"); > // draw preloader > _root.createEmptyMovieClip("preloader_mc", _root.getNextHighestDepth() ); > _root.preloader_mc.createTextField("preloader_txt", _root.getNextHighestDepth, 0, 0, 200, 20); > with (_root.preloader_mc.preloader_txt) { > embedFonts = true; > selectable = false; > setNewTextFormat(format1_fmt); > text = "LOADING SITE: 00" > }; > _root.preloader_mc._x = (Stage.width/2) - (_root.preloader_mc.preloader_txt._width/2); > _root.preloader_mc._y = (Stage.height/2) - (_root.preloader_mc.preloader_txt._height/2); > // --------- > // preload > _root.onEnterFrame = function() { > tBytes = _root.target_mc.getBytesTotal(); > bLoaded = _root.target_mc.getBytesLoaded(); > percent = Math.round((bLoaded/tBytes)*100); > if (bLoaded < tBytes) { > _root.preloader_mc.preloader_txt.text = "loading site: " + percent; > } else { > trace("completed loading!"); > _root.preloader_mc.removeMovieClip(); > _root.preloader_mc.preloader_txt.removeTextField(); > delete this.onEnterFrame; > }; > }; >}; >// ------------------------- >preloader(); >// ------------------------- > >// http://www.murderdesign.com/preloader.swf >_______________________________________________ >Flashcoders@chattyfig.figleaf.com >To change your subscription options or search the archive: >http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > >Brought to you by Fig Leaf Software >Premier Authorized Adobe Consulting and Training >http://www.figleaf.com >http://training.figleaf.com > > > > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com