RE: [Flashcoders] preloading multiple swfs with moviecliploader
Here's a good solution that is used by many installer applications out there. Take the number of items you are loading and divide your progress bar into that many sections. Then, show the progress of each of those sections. Let's say you were loading 10 files. That means you're breaking up your progress in 10 10% sections. The first 10% you are basically showing 1-100% of the first 10%, then the next 1-100% of the next 10%, etc. So, if you're 50% through the second download, you're at 15%. So, your overall percentage is 100 / # of files to load. Then you do a 0-100% progress within that total area. HTH, Steven > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Michele Moore > Sent: Friday, April 07, 2006 1:37 PM > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] preloading multiple swfs with moviecliploader > > I know that this is a post from back in February, but I'm > having the same issue. I'll try the ideas put forth here so > far, but I wanted to respond to Andreas's post to see if > maybe anyone can elaborate. > > The issue for me is tracking the items when using one > object for loading. If I'm loading 10 jpgs, for example, and > doing it via: > mclLoader.loadClip(aPhoto[iN], mcLoader[iN]), when I use > mclLoader.onLoadProgress(target, bytesLoaded, bytesTotal) > It will track individually each of the items loading not > all of them together. What is returned is data for each > target individually, with no way to reference an one item's > data. The getProgress() method works similarly in that you > call it on one of the targets, but not on all of them combined. > > Does this make sense? > > > > michele moore > pilot design > > > > ___ > 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 > ___ This e-mail is intended only for the named person or entity to which it is addressed and contains valuable business information that is privileged, confidential and/or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. All contents are the copyright property of Agency.com Ltd., its affiliates or a client of such agencies. If you are not the intended recipient, you are nevertheless bound to respect the worldwide legal rights of Agency.com, its affiliates and its clients. We require that unintended recipients delete the e-mail and destroy all electronic copies in their system, retaining no copies in any media. If you have received this e-mail in error, please immediately notify us via e-mail to [EMAIL PROTECTED] We appreciate your cooperation. We make no warranties as to the accuracy or completeness of this e-mail and accept no liability for its content or use. Any opinions expressed in this e-mail are those of the author and do not necessarily reflect the opinions of Agency.com or any of its affiliates. ___ 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
RE: [Flashcoders] preloading multiple swfs with moviecliploader
Huh? I don't have a problem I was posting this class to help out the guy that asked the original question. This is a class for loading multiple swfs using moviecliploader just like he asked for. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Rønning Sent: 22 February 2006 02:41 To: Flashcoders mailing list Subject: Re: [Flashcoders] preloading multiple swfs with moviecliploader Wouldn't you just loop through an array of moviecliploaders and check if they were all finished? Or have every onLoadInit call a function that increments a number, and if that number is equal to the number of movieClipLoaders, then they're all done? Or you could use mcLoader.onProgress or whatever it's called and do the oldschool bytestotal/bytesloaded check for all of them and get an average percentage for the whole lot? I don't see the problem, what specifically is causing you trouble? - A jim wrote: > Sorry, didn't put the link in > > http://www.codesortium.com/demo/loader.zip > > Jim > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of jim > Sent: 21 February 2006 23:13 > To: 'Flashcoders mailing list' > Subject: RE: [Flashcoders] preloading multiple swfs with moviecliploader > > Been playing with this myself for a while, this isn't tested much but I > think its what you want. If you need a bit more help call. > > Jim > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Randy > Tinfow > Sent: 21 February 2006 16:43 > To: flashcoders@chattyfig.figleaf.com > Subject: [Flashcoders] preloading multiple swfs with moviecliploader > > Has anyone been able to preload multiple swfs concurrently and keep > track of progress globally rather than for individual files? > > We can do it sequentially, but that ain't pretty for the user when they > have to endure 12 serial progress bars. > > TIA, > > Randy Tinfow > IMAGE PLANT > > ___ > 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 ___ 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
Re: [Flashcoders] preloading multiple swfs with moviecliploader
Wouldn't you just loop through an array of moviecliploaders and check if they were all finished? Or have every onLoadInit call a function that increments a number, and if that number is equal to the number of movieClipLoaders, then they're all done? Or you could use mcLoader.onProgress or whatever it's called and do the oldschool bytestotal/bytesloaded check for all of them and get an average percentage for the whole lot? I don't see the problem, what specifically is causing you trouble? - A jim wrote: Sorry, didn't put the link in http://www.codesortium.com/demo/loader.zip Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim Sent: 21 February 2006 23:13 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] preloading multiple swfs with moviecliploader Been playing with this myself for a while, this isn't tested much but I think its what you want. If you need a bit more help call. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Randy Tinfow Sent: 21 February 2006 16:43 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] preloading multiple swfs with moviecliploader Has anyone been able to preload multiple swfs concurrently and keep track of progress globally rather than for individual files? We can do it sequentially, but that ain't pretty for the user when they have to endure 12 serial progress bars. TIA, Randy Tinfow IMAGE PLANT ___ 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
RE: [Flashcoders] preloading multiple swfs with moviecliploader
Sorry, didn't put the link in http://www.codesortium.com/demo/loader.zip Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jim Sent: 21 February 2006 23:13 To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] preloading multiple swfs with moviecliploader Been playing with this myself for a while, this isn't tested much but I think its what you want. If you need a bit more help call. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Randy Tinfow Sent: 21 February 2006 16:43 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] preloading multiple swfs with moviecliploader Has anyone been able to preload multiple swfs concurrently and keep track of progress globally rather than for individual files? We can do it sequentially, but that ain't pretty for the user when they have to endure 12 serial progress bars. TIA, Randy Tinfow IMAGE PLANT ___ 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
RE: [Flashcoders] preloading multiple swfs with moviecliploader
Been playing with this myself for a while, this isn't tested much but I think its what you want. If you need a bit more help call. Jim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Randy Tinfow Sent: 21 February 2006 16:43 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] preloading multiple swfs with moviecliploader Has anyone been able to preload multiple swfs concurrently and keep track of progress globally rather than for individual files? We can do it sequentially, but that ain't pretty for the user when they have to endure 12 serial progress bars. TIA, Randy Tinfow IMAGE PLANT ___ 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
Re: [Flashcoders] preloading multiple swfs with moviecliploader
If you need to preload 12 files, you can do it sequentially with only one progress bar. Each loading progress needs to update 1/12 portion of the progress bar with a formula like this: currentPercent = currentMovie.getBytesLoaded() / currentMovie.getBytesTotal(); totalPercent = (loadedFiles + currentPercent) * 12; loadedFiles needs to be initialized to zero and increased by 1 when a loading finishes. If all the files are similar in size, the progress bar will grow smooth, but if there are small files and other ones bigger, the 1/12 portion of the progress bar will grow fast with small files and slow with the big ones. Cheers Miguel Angel Sánchez Spain Randy Tinfow escribió: Has anyone been able to preload multiple swfs concurrently and keep track of progress globally rather than for individual files? We can do it sequentially, but that ain't pretty for the user when they have to endure 12 serial progress bars. TIA, Randy Tinfow IMAGE PLANT ___ 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
Re: [Flashcoders] preloading multiple swfs with moviecliploader
Well, presuming you're speaking of on-line delivery, you're kind of at the mercy of the browser on that one, as most browsers have a physicial limit of 4 simultaneous connections (download streams), though I think some versions on the Mac allow up to 7, such that any quantity of files greater than that will simply have to wait their turns. The problem therein is that the sum of all file sizes is not known until the last file has loaded enough that the byte values can be retrieved, so that means that some files have to load in their entirety before the sizes of others are even known. One way around that is to use a server-side script to feed the filesizes of all files to be loaded to Flash in advance of the first file load, such that the progress bar can be "constructed", in advance, to measure the progress properly. But then again, if you do that, there's really no need to load files quasi-simultaneously -- you can then simply load sequentially. -- Byron "Barn" Canfield > Has anyone been able to preload multiple swfs concurrently and keep > track of progress globally rather than for individual files? > > We can do it sequentially, but that ain't pretty for the user when they > have to endure 12 serial progress bars. > > TIA, > > Randy Tinfow > IMAGE PLANT ___ 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