I see, so I need to have a progress bar in the Java applet itself. Hmm, don't suppose you know Java :) Well I do have a few images I would like to preload, they are the flags at the bottom, I don't think they need it really. This is a new avenue to look into, but I'm wondering, I'm intrigued that the Java applet can launch a sub program before the main loading only to show the progress of it, is that what you mean?
On Mar 24, 3:37 am, Sebastian Markbåge <[email protected]> wrote: > None of those options will give you a proper progress report since you > only have two files. At best you'll get three steps. 0%, 50%, 100%. > There's no way to get each incremental download step for each byte in > JavaScript. The primary use case for pre-loading in JavaScript is to > load resources that might be needed by the visitor later on before > they even need it. > > If your visitor reaches the applet right away you probably want him to > see a progress bar. In that case, I recommend you create a small boot- > loader applet that only does two things: Shows a progress bar and > loads the full applet. > > But you need to do this in your Java applet. Not in JavaScript and not > using MooTools. > > On 24 Mar, 04:21, caturn88 <[email protected]> wrote: > > > Hi, thanks for replying! > > > I'm not entirely sure what you mean and when I went to c7P the code > > you kindly posted it was immediately apparent (from my little > > programming knowledge) that there is a counter and that is how the > > percentage meter works, but I think it looks at the "images" var to > > make the whole thing work. I tried supplementing the "var images" line > > of code for your but it didn't work. > > > Was your suggestion in place of the whole preloading code that I had > > put in, you see the thing is I really wanted a progress meter, that's > > what this gives me. Can the code you gave me be integrated into the > > existing one so it works? > > > Thanks. > > > On Mar 24, 2:50 am, Sebastian Markbåge <[email protected]> wrote: > > > > Asset.images is really more for loading image elements and extending > > > those elements. > > > > Pre-loading is basically just making a request to a resource that the > > > browser will cache. > > > > So you could pretty much just make a Request to that resource and > > > ignore the response. Something like: > > > > new Request({ url: 'http://meta.projectmio.com/code/ > > > bubble_4.jar' }).get(); > > > new Request({ url: 'http://meta.projectmio.com/code/core.jar'}).get > > > (); > > > > On 23 Mar, 15:47, caturn88 <[email protected]> wrote: > > > > > Hi, my website has a large Java applet on its as the main feature and > > > > it takes a while to load, without it there is a big blank area. So I > > > > added this MooTools script from David Walsh (http://davidwalsh.name/ > > > > mootools-image-preloading-progress-bar) that pre-loads images, but I > > > > need to modify it to pre-load .jar files. > > > > > Here is the pre-loading code: > > > > > /* preloading */ > > > > var images = ['http://meta.projectmio.com/code/bubble_4.jar', 'http:// > > > > meta.projectmio.com/code/core.jar']; > > > > var loader = new Asset.images(images, { > > > > onProgress: function(counter,index) { > > > > progressBar.set((counter + 1) * (100 / images.length)); > > > > > }, > > > > }); > > > > }); > > > > > I have no idea how hard this would be to do, I don't even know if this > > > > is the part of the code to modify but it titled as the pre-loading > > > > section, although there is some JavaScript too and I'm not sure if it > > > > all done there? > > > > > But thanks to anybody who is willing to help. > > > > > My website is:www.meta.projectmio.com
