Thanks Ron, but I think you've overlooked a fairly important point in my original message: The images for the animations are stored online. They can't be included as part of the package with the gadget, as the download would be over 20 Mb!
Because of this, unfortunately neither of your suggestions are viable. In the Google Desktop Gadgets environment, something like this: <img name="frame1" src="someFolder/image1.png" opacity="255" /> ...won't work if the "someFolder" is a remote url. You cannot load remote images simply by specifying the path. If you could, this whole scenario would be infinitely simpler! Of course, images can be fetched from the net, and loaded into an img object using an XMLHttpRequest - but that brings us back to the problem of getting multiple images pulled down and loaded in one shot. So - it's back to square one I'm afraid :/ - Tim On Jan 29, 2:26 am, Ron Conescu <[email protected]> wrote: > Tim, > > I was thinking of letting Google Desktop do it for you. 2 ideas: > > 1) Do you know the paths to the images ahead of time? If you do, you > could just put them into a DIV tag, and hide all but the active one: > > <view width="500" height="500"> > <div name="animationDiv" width="500" height="500"> > <img name="frame1" src="someFolder/image1.png" opacity="255" /> > <img name="frame2" src="someFolder/image2.png" opacity="0" /> > <img name="frame3" src="someFolder/image3.png" opacity="0" /> > ... > </div> > </view> > > ...which makes Google Desktop load them for you, without any effort on > your part. Then you could write a loop that successively fades in > each item in sequence, and fades out the previous one. I can show you > that code if you like. > > 2) If you DON'T know the images ahead of time, you can write some code > which generates the "img" tags above -- e.g., > > var frame1string = "<img src='somefolder\image1.png'>"; > var frame2string = "<img src='somefolder\image2.png'>"; > var frame3string = "<img src='somefolder\image3.png'>"; > > and then use appendElement() to load them into some container, such as > my "animationDiv" tag above: > > var frame1pointer = animationDiv.appendElement (frame1string); > var frame2pointer = animationDiv.appendElement (frame2string); > var frame3pointer = animationDiv.appendElement (frame3string); > > ...which, again, happens as quickly as Google Desktop can make it > happen (in my experience). Then you're in the same situation you were > in for #1, and you can write a loop which successively animates those > loaded images. > > Does this make any sense at all? > > ron > > > > On Fri, Jan 22, 2010 at 5:56 PM, Timmaah! <[email protected]> wrote: > > Hi Ron, > > > Thanks for your reply. The length of the animations isn't such a big > > problem - they are around 5-20 frames each, and they animate quite > > slowly (approx. 1 frame per second). The animations are guides showing > > how to write complex symbols. > > > So, no - the problem isn't with the quantity of images that need to be > > loaded at any one time. The problem is with this part: > > >> - load a batch of images (say, a few hundred) into an array > > > How would you go about doing this part? Are you suggesting multiple > > simultaneous XMLHttpRequests? Because I've seen it stated by several > > sources that no more than 2 such requests should be carried out at any > > one time. How would you load a batch of images into your gadget? I've > > now approached this problem with several different methods (detailed > > above), and have not yet found a workable solution. > > > Any help you'd be able to give me with regards to the loading in of > > the images would be greatly appreciated. > > > Thanks a lot, > > > - Tim > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Desktop Developer Group" group. > > To post to this group, send email to > > [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/google-desktop-developer?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Desktop Developer Group" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-desktop-developer?hl=en.
