I had to make a sort of slideshow for a site I''m working on, and I was thinking of making it into a Scriptaculous object. Anyone think of reasons why I shouldn''t? You''d have to pass in all the image urls and a div id, with an optional delay parameter to determine how long to leave each image up before moving on. I could also have a ''randomize'' option, when set to true it would pull the images randomly. It would cross-fade them using Effect.Fade and Effect.Appear. Syntax would be something like: new Effect.Slideshow(''div_id'', [''image1.jpg'', ''image2.jpg''...], { delay: #.# (in seconds, with a default of 10 seconds), randomize: true/false }); The script would create the img tag inside of the div (it''d actually create 2, 1 hidden and 1 showing, then fade one out while the other fades in). What do y''all think of that idea? If someone''s already working on something like that, then cool. Greg
How about this: <div id="slideshow"> <div id="a"><img .... /><div>Some description</div></div> <div id="b"><img .... /></div> <div id="c"><img .... /></div> </div> Then: Effect.Slideshow("slideshow", { delay.... }); This would take all the children of ''slideshow'', and hide them all except the first, and then switching between them as before. I like this better because I can now style each image as I want, and I can also add text, or something else. It allows more freedom, and all the slideshow code does is hide/show the inner pieces without needing to know anything about them. In this case, I don''t even need images, I can do this with paragraphs of text, or whatever else I can find to put in my child DIVs. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 12:45 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] anyone interested in an Effect.Slideshow? I had to make a sort of slideshow for a site I''m working on, and I was thinking of making it into a Scriptaculous object. Anyone think of reasons why I shouldn''t? You''d have to pass in all the image urls and a div id, with an optional delay parameter to determine how long to leave each image up before moving on. I could also have a ''randomize'' option, when set to true it would pull the images randomly. It would cross-fade them using Effect.Fade and Effect.Appear. Syntax would be something like: new Effect.Slideshow(''div_id'', [''image1.jpg'', ''image2.jpg''...], { delay: #.# (in seconds, with a default of 10 seconds), randomize: true/false }); The script would create the img tag inside of the div (it''d actually create 2, 1 hidden and 1 showing, then fade one out while the other fades in). What do y''all think of that idea? If someone''s already working on something like that, then cool. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I think that sounds great. It seems like it would also be nice to have the option of having the next image url determined by an ajax call. Casey On 1/13/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote:> > I had to make a sort of slideshow for a site I''m working on, and I was > thinking of making it into a Scriptaculous object. Anyone think of > reasons why I shouldn''t? You''d have to pass in all the image urls and a > div id, with an optional delay parameter to determine how long to leave > each image up before moving on. I could also have a ''randomize'' option, > when set to true it would pull the images randomly. It would cross-fade > them using Effect.Fade and Effect.Appear. > > Syntax would be something like: > new Effect.Slideshow(''div_id'', [''image1.jpg'', ''image2.jpg''...], { delay: > #.# (in seconds, with a default of 10 seconds), randomize: true/false > }); > > The script would create the img tag inside of the div (it''d actually > create 2, 1 hidden and 1 showing, then fade one out while the other > fades in). > > What do y''all think of that idea? > > If someone''s already working on something like that, then cool. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Heya, Great idea! Now if you can manage to have other effects than only fade/appear in... :) Would be great with slides/blinds/what-have-you. Cheers, Thomas Am 13.01.2006 um 21:45 schrieb Gregory Hill:> I had to make a sort of slideshow for a site I''m working on, and I was > thinking of making it into a Scriptaculous object. Anyone think of > reasons why I shouldn''t? You''d have to pass in all the image urls > and a > div id, with an optional delay parameter to determine how long to > leave > each image up before moving on. I could also have a ''randomize'' > option, > when set to true it would pull the images randomly. It would cross- > fade > them using Effect.Fade and Effect.Appear. > > Syntax would be something like: > new Effect.Slideshow(''div_id'', [''image1.jpg'', ''image2.jpg''...], > { delay: > #.# (in seconds, with a default of 10 seconds), randomize: true/false > }); > > The script would create the img tag inside of the div (it''d actually > create 2, 1 hidden and 1 showing, then fade one out while the other > fades in). > > What do y''all think of that idea? > > If someone''s already working on something like that, then cool. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes > Sent: Friday, January 13, 2006 1:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] anyone interested in anEffect.Slideshow?> > How about this: > <div id="slideshow"> > <div id="a"><img .... /><div>Somedescription</div></div>> <div id="b"><img .... /></div> > <div id="c"><img .... /></div> > </div> > > Then: > Effect.Slideshow("slideshow", { delay.... }); > > This would take all the children of ''slideshow'', and hide them allexcept> the first, and then switching between them as before. > > I like this better because I can now style each image as I want, and Ican> also add text, or something else. It allows more freedom, and all the > slideshow code does is hide/show the inner pieces without needing toknow> anything about them. > > In this case, I don''t even need images, I can do this with paragraphsof> text, or whatever else I can find to put in my child DIVs.That''s a great idea and shouldn''t be too tough to implement. Of course, if you have a lot of images, loading them all with the page might make the page load slowly. Greg
What would be really cool is if you could pass it a xml formatted document that would have all the images in it and the load them on the fly instead of loading them all at once. Jon Whitcraft Web Application Developer Online Services - Indianapolis Motor Speedway (317) 492-8623 -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 4:04 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow?> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes > Sent: Friday, January 13, 2006 1:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] anyone interested in anEffect.Slideshow?> > How about this: > <div id="slideshow"> > <div id="a"><img .... /><div>Somedescription</div></div>> <div id="b"><img .... /></div> > <div id="c"><img .... /></div> > </div> > > Then: > Effect.Slideshow("slideshow", { delay.... }); > > This would take all the children of ''slideshow'', and hide them allexcept> the first, and then switching between them as before. > > I like this better because I can now style each image as I want, and Ican> also add text, or something else. It allows more freedom, and all the > slideshow code does is hide/show the inner pieces without needing toknow> anything about them. > > In this case, I don''t even need images, I can do this with paragraphsof> text, or whatever else I can find to put in my child DIVs.That''s a great idea and shouldn''t be too tough to implement. Of course, if you have a lot of images, loading them all with the page might make the page load slowly. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs ******************** ******************** This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted. ******************** ********************
My idea, coupled with the ''Ajax to get the next image'' from Casey would alleviate the image loading problem. The next image would just be another element inserted as a child in my scheme. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 1:04 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow?> -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org[mailto:rails-spinoffs-> bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes > Sent: Friday, January 13, 2006 1:58 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] anyone interested in anEffect.Slideshow?> > How about this: > <div id="slideshow"> > <div id="a"><img .... /><div>Somedescription</div></div>> <div id="b"><img .... /></div> > <div id="c"><img .... /></div> > </div> > > Then: > Effect.Slideshow("slideshow", { delay.... }); > > This would take all the children of ''slideshow'', and hide them allexcept> the first, and then switching between them as before. > > I like this better because I can now style each image as I want, and Ican> also add text, or something else. It allows more freedom, and all the > slideshow code does is hide/show the inner pieces without needing toknow> anything about them. > > In this case, I don''t even need images, I can do this with paragraphsof> text, or whatever else I can find to put in my child DIVs.That''s a great idea and shouldn''t be too tough to implement. Of course, if you have a lot of images, loading them all with the page might make the page load slowly. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Tom, I think using the ahah mentality would work nice for what you are suggesting. Pull in a fully formatted div, image, page or what ever you wanted it to be. Casey On 1/13/06, Tom Fakes <Tom-SpgrXpdGZSiNACpsiTyfug@public.gmane.org> wrote:> > My idea, coupled with the ''Ajax to get the next image'' from Casey would > alleviate the image loading problem. The next image would just be > another element inserted as a child in my scheme. > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Gregory Hill > Sent: Friday, January 13, 2006 1:04 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow? > > > > > -----Original Message----- > > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs- > > bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Tom Fakes > > Sent: Friday, January 13, 2006 1:58 PM > > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: RE: [Rails-spinoffs] anyone interested in an > Effect.Slideshow? > > > > How about this: > > <div id="slideshow"> > > <div id="a"><img .... /><div>Some > description</div></div> > > <div id="b"><img .... /></div> > > <div id="c"><img .... /></div> > > </div> > > > > Then: > > Effect.Slideshow("slideshow", { delay.... }); > > > > This would take all the children of ''slideshow'', and hide them all > except > > the first, and then switching between them as before. > > > > I like this better because I can now style each image as I want, and I > can > > also add text, or something else. It allows more freedom, and all the > > slideshow code does is hide/show the inner pieces without needing to > know > > anything about them. > > > > In this case, I don''t even need images, I can do this with paragraphs > of > > text, or whatever else I can find to put in my child DIVs. > > That''s a great idea and shouldn''t be too tough to implement. Of course, > if you have a lot of images, loading them all with the page might make > the page load slowly. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> My idea, coupled with the ''Ajax to get the next image'' from Caseywould> alleviate the image loading problem. The next image would just be > another element inserted as a child in my scheme.So, the ajax call would return the entire child element to be added, not necessarily just an image? That could work. Greg
Combining Rails, Scriptaculous, Prototype, Ajax and AHAH! Very Web 2.0 - I sense a Beta shortly followed by an IPO. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 1:13 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow?> My idea, coupled with the ''Ajax to get the next image'' from Caseywould> alleviate the image loading problem. The next image would just be > another element inserted as a child in my scheme.So, the ajax call would return the entire child element to be added, not necessarily just an image? That could work. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> Combining Rails, Scriptaculous, Prototype, Ajax and AHAH! Very Web2.0 -> I > sense a Beta shortly followed by an IPO.Heh. Forgive my ignorance, but what is AHAH? I''m a bit behind on my buzzwords :) Greg
I had to look it up too: http://microformats.org/wiki/rest/ahah -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 1:18 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow?> Combining Rails, Scriptaculous, Prototype, Ajax and AHAH! Very Web2.0 -> I > sense a Beta shortly followed by an IPO.Heh. Forgive my ignorance, but what is AHAH? I''m a bit behind on my buzzwords :) Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
AHAH is an other word for what Prototype and Rails does since like March 2005 (with Ajax.Updater). -Thomas Am 13.01.2006 um 22:20 schrieb Tom Fakes:> I had to look it up too: http://microformats.org/wiki/rest/ahah > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of > Gregory Hill > Sent: Friday, January 13, 2006 1:18 PM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: RE: [Rails-spinoffs] anyone interested in an > Effect.Slideshow? > >> Combining Rails, Scriptaculous, Prototype, Ajax and AHAH! Very Web > 2.0 - >> I >> sense a Beta shortly followed by an IPO. > > Heh. Forgive my ignorance, but what is AHAH? I''m a bit behind on my > buzzwords :) > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On Fri, 2006-01-13 at 14:13 -0700, Gregory Hill wrote:> > My idea, coupled with the ''Ajax to get the next image'' from Casey > would > > alleviate the image loading problem. The next image would just be > > another element inserted as a child in my scheme. > > So, the ajax call would return the entire child element to be added, not > necessarily just an image? That could work.I would think that''s who it would have to work (i.e. insert the IMG tag) if you wanted it to support anything, like DIVs full of text, or DIVs with images and descriptions, like someone suggested. I like the idea of just sticking in any element better than only retrieving images.
I like the idea. Is it possible to have an optional callback that we can register before and after the next "call"? The callback could take say the response object and the current slideshow object as parameters. so it''d be something like: Effect.Slideshow(div, url, {delay:0.30, before:XXX, after:YYY}); XXX(slideshow) would get invoked after the delay. YYY(slideshow, response) gets invoked after results come back, but before they are displayed. We could probably also use a stop() method to halt the slideshow.
Ok, I have a rough draft working with the childNodes option, but I haven''t implemented the ajax version yet. As for the transition effects, what pairs of effects should we use? I have Appear/Fade going right now, but I can easily add other options. I was thinking of doing the BlindDown and SlideDown options, but having the image that is going away do the reverse won''t look right. You''d have a new one sliding down while the old one slides up? No, the old one should slide down, but just start from the top and gradually slide away. Is there an option for doing that (i.e. slide down towards the bottom instead of sliding down from the top)? The wiki''s in and out, so I''m not able to get to the docs at the moment. I imagine I could do a Grow/Shrink pairing, so I''ll try that out. I could add a ''random'' option to have it randomly pick an animation pair when changing. Might be fun. Are there guidelines for how to set up what the server-side returns for scriptaculous ajax functions? I''ve not really messed with any of the scriptaculous ajax functions yet, so I want to make sure I''m consistent with the rest. Greg
Could you set these as options with Appear and Fade as the defaults { showeffect: function() { Effect.Appear.... }, hideeffect: function() { Effect.Fade.... } } That way I can make it looks as screwy as I want! Check out the Draggable.prototype definition for how to do this. -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Friday, January 13, 2006 2:58 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone interested in an Effect.Slideshow? Ok, I have a rough draft working with the childNodes option, but I haven''t implemented the ajax version yet. As for the transition effects, what pairs of effects should we use? I have Appear/Fade going right now, but I can easily add other options. I was thinking of doing the BlindDown and SlideDown options, but having the image that is going away do the reverse won''t look right. You''d have a new one sliding down while the old one slides up? No, the old one should slide down, but just start from the top and gradually slide away. Is there an option for doing that (i.e. slide down towards the bottom instead of sliding down from the top)? The wiki''s in and out, so I''m not able to get to the docs at the moment. I imagine I could do a Grow/Shrink pairing, so I''ll try that out. I could add a ''random'' option to have it randomly pick an animation pair when changing. Might be fun. Are there guidelines for how to set up what the server-side returns for scriptaculous ajax functions? I''ve not really messed with any of the scriptaculous ajax functions yet, so I want to make sure I''m consistent with the rest. Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> Could you set these as options with Appear and Fade as the defaults > { > showeffect: function() { Effect.Appear.... }, > hideeffect: function() { Effect.Fade.... } > } > > That way I can make it looks as screwy as I want! > > Check out the Draggable.prototype definition for how to do this.Sure, I can add that, but I like the idea of having predefined pairings available as well. So, if you pass in your own, it won''t use a pre-defined. The functions will need to accept an element argument, like this: { showeffect: function(element) { Effect.Appear(element) }, hideeffect: function(element) { Effect.Fade(element) } } I''d also like to make it so you can pass in effect options when using a pre-defined pairing. So, maybe have this also: { showoptions: { duration: 0.2 }, hideoptions: { duration: 0.4 } } What do y''all think? Greg
I like it. I''d also like to see (optional) before and after callbacks on the AJAX request to grab the next content. Actually, some thought needs to be given on how it''s going to construct the AJAX request for more content. If we rely on a session, we could just use the same defined URL for each call. It''d be much more flexible if we could (re)define the URL between invocations. So first call could be /my/photo?id=1 next is /my/photo?id=2 and so forth and at /my/photo?id=10 we tell the slide show to stop. But what if we can''t rely on consecutive integers, or if the ids aren''t even numeric? Any thoughts on how we can best control the sequence? On 1/13/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote: [snip]> > The functions will need to accept an element argument, like this: > { > showeffect: function(element) { Effect.Appear(element) > }, > hideeffect: function(element) { Effect.Fade(element) } > } > > I''d also like to make it so you can pass in effect options when using a > pre-defined pairing. So, maybe have this also: > > { > showoptions: { duration: 0.2 }, > hideoptions: { duration: 0.4 } > } > > What do y''all think? > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
As long as there''s a "before loading the next image, call this function" built into it, it shouldn''t be hard to make that function able to redefine the URL to be called to get the next image. -Jerod On 1/13/06, Kenneth Lee <klee-V4T3VnvIyc0@public.gmane.org> wrote:> > I like it. I''d also like to see (optional) before and after callbacks > on the AJAX request to grab the next content. > > Actually, some thought needs to be given on how it''s going to > construct the AJAX request for more content. > > If we rely on a session, we could just use the same defined URL for > each call. It''d be much more flexible if we could (re)define the URL > between invocations. > > So first call could be /my/photo?id=1 > next is /my/photo?id=2 and so forth > and at /my/photo?id=10 we tell the slide show to stop. > > But what if we can''t rely on consecutive integers, or if the ids > aren''t even numeric? > > Any thoughts on how we can best control the sequence? > > On 1/13/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote: > [snip] > > > > The functions will need to accept an element argument, like this: > > { > > showeffect: function(element) { Effect.Appear(element) > > }, > > hideeffect: function(element) { Effect.Fade(element) } > > } > > > > I''d also like to make it so you can pass in effect options when using a > > pre-defined pairing. So, maybe have this also: > > > > { > > showoptions: { duration: 0.2 }, > > hideoptions: { duration: 0.4 } > > } > > > > What do y''all think? > > > > Greg > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hey Greg, awesome idea, I really look forward to see the "finished" version (or the first draft). Here are my two cents: What I really don''t like with most of the slideshows online is that it does not preload the next images. So, everytime I click on "next" image, it takes a while. I would like to see a feature that "buffers" the next 3 (or "X") and the last 3 screens so they are instantly there... what do you think? greetings, benni. -SDG- Gregory Hill wrote:> I had to make a sort of slideshow for a site I''m working on, and I was > thinking of making it into a Scriptaculous object. Anyone think of > reasons why I shouldn''t? You''d have to pass in all the image urls and a > div id, with an optional delay parameter to determine how long to leave > each image up before moving on. I could also have a ''randomize'' option, > when set to true it would pull the images randomly. It would cross-fade > them using Effect.Fade and Effect.Appear. > > Syntax would be something like: > new Effect.Slideshow(''div_id'', [''image1.jpg'', ''image2.jpg''...], { delay: > #.# (in seconds, with a default of 10 seconds), randomize: true/false > }); > > The script would create the img tag inside of the div (it''d actually > create 2, 1 hidden and 1 showing, then fade one out while the other > fades in). > > What do y''all think of that idea? > > If someone''s already working on something like that, then cool. > > Greg > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
> Here are my two cents: What I really don''t like with most of the > slideshows online is that it does not preload the next images. So, > everytime I click on "next" image, it takes a while. I would like tosee> a feature that "buffers" the next 3 (or "X") and the last 3 screens so > they are instantly there... >Well, the way it''s programmed now it keeps a queue of ''unfinishedFrames'' and pulls from that to get the next frame. So, theoretically, when I finished the ajax-ified version you could just return multiple frames in an ajax call and those would all be added to the queue. I suppose I could also add an option to let you decide at which point to ask the server for more frames, like if there are X number of unfinished frames, it''s time to call the server (defaults to 0). I''ve got some more urgent things to finish up at work, but I should be able to spare a little time over the next few days to wrap this up. Btw, anyone have any idea why SlideDown and SlideUp aren''t working for me here? They throw an error deeper down in the prototype code and I haven''t backtracked it yet. Were there some bugs fixed in 1.5.1? I think I''m still on 1.5.0. Greg