Ok, I''m almost done programming this, although I still have to test the ajax version. Anyway, I thought I''d pass along the documentation to y''all, so you can look it over and see if there''s anything missing, or anything I should change. There''s a lot to read here, so if you aren''t interested, quit now :) Effect.Slideshow: Syntax: new Effect.Slideshow(element, options); Any childNodes on the element will be used as the starting frame buffer. You are responsible for setting any positioning and giving elements layout if the underlying effects need layout. Options: ''delay'' (in seconds - default 5) - sets how long the system waits before loading the next frame ''randomize'' (boolean - default false) - randomizes the order that frames are loaded ''repeat'' (boolean - default false) - if true, the slideshow will repeat the entire frame buffer after it completes it ''effectPair'' (''fade'', ''grow'', ''slide'', or ''blind'' so far) - sets a predefined pair of effects to be used. ''random'' will randomly choose a pair of effects between each frame (all will be used before one is repeated) ''showEffect'' (function reference) - lets you define your own effect for showing the next frame ''showOptions'' (associative array) - is passed into the showEffect. Allows you to pass options to be used in the pre-defined effect pairs or into your own custom showEffect ''hideEffect'' (function reference) - same as showEffect, but used on the frame that is going away ''hideOptions'' (associative array) - same as showOptions, but used on the hideEffect ''onBeforeChange'' (function reference) - callback that is called just before the frame changes ''onAfterChange'' (function reference) - callback called after the frame is changed ''startPaused'' (boolean - default false) - if you don''t want the slideshow to start automatically, set this to true Public Variables: .currentFrame - the DOM element that is currently showing .isPaused - whether it is paused .isDone - if it has rendered it''s last frame and isn''t repeating Public Methods: .pause() - lets you pause the slideshow on the current frame .play() - resumes playing the slideshow .goForward() - goes to the next frame in the buffer, cannot be used if randomize is true .goBackward() - goes to the previous frame in the buffer, cannot be used if randomize is true .repeat() - makes the slideshow repeat. If it has already stopped playing, it will start again .stopRepeating() - tells the slideshow to stop repeating, will continue to finish out the current buffer Ajax.Slideshow: Syntax: new Ajax.Slideshow(element, url, options); Has all of the Effect.Slideshow methods, options, and variables, plus the following: Options: ''minFrames'' (integer - defaults to 2) - when there are this number or fewer frames in the buffer, the url will be called via Ajax to supply additional frames Public Methods: .changeUrl(url) - changes the url to be called via Ajax to let you redefine it after each ajax request That''s what I have so far, anything else I should add? Greg
Looks like Outlook (I hate having to use it at work) stripped some new lines, here''s the options section again: Options: ''delay'' (in seconds - default 5) - sets how long the system waits before loading the next frame ''randomize'' (boolean - default false) - randomizes the order that frames are loaded ''repeat'' (boolean - default false) - if true, the slideshow will repeat the entire frame buffer after it completes it ''effectPair'' (''fade'', ''grow'', ''slide'', or ''blind'' so far) - sets a predefined pair of effects to be used. ''random'' will randomly choose a pair of effects between each frame (all will be used before one is repeated) ''showEffect'' (function reference) - lets you define your own effect for showing the next frame ''showOptions'' (associative array) - is passed into the showEffect. Allows you to pass options to be used in the pre-defined effect pairs or into your own custom showEffect ''hideEffect'' (function reference) - same as showEffect, but used on the frame that is going away ''hideOptions'' (associative array) - same as showOptions, but used on the hideEffect ''onBeforeChange'' (function reference) - callback that is called just before the frame changes ''onAfterChange'' (function reference) - callback called after the frame is changed ''startPaused'' (boolean - default false) - if you don''t want the slideshow to start automatically, set this to true
Without an usage example didn''t get it ! Lets say a have 50 pics at flickr which I want to use for the slideshow, I want to fade them in/out and show them for 5 sec (or the time needed for loading the next pic). Is that possible ? Is there a possibility to hook in some buttons for moving manually forwards/backwards at the slideshow ? Anyway, this is a very intersting project and I look forward to test it ! Some weeks ago I made some research about other javascript based slideshows: http://www.rsaccon.com/articles/2005/11/28/javascript-based-slidehows On 1/20/06, Gregory Hill <Gregory_Hill-l9nu40+TWxQ@public.gmane.org> wrote:> > Looks like Outlook (I hate having to use it at work) stripped some new > lines, here''s the options section again: > > Options: > ''delay'' (in seconds - default 5) - sets how long the system waits before > loading the next frame > > ''randomize'' (boolean - default false) - randomizes the order that frames > are loaded > > ''repeat'' (boolean - default false) - if true, the slideshow will repeat > the entire frame buffer after it completes it > > ''effectPair'' (''fade'', ''grow'', ''slide'', or ''blind'' so far) - sets a > predefined pair of effects to be used. ''random'' will randomly choose a > pair of effects between each frame (all will be used before one is > repeated) > > ''showEffect'' (function reference) - lets you define your own effect for > showing the next frame > > ''showOptions'' (associative array) - is passed into the showEffect. > Allows you to pass options to be used in the pre-defined effect pairs or > into your own custom showEffect > > ''hideEffect'' (function reference) - same as showEffect, but used on the > frame that is going away > > ''hideOptions'' (associative array) - same as showOptions, but used on the > hideEffect > > ''onBeforeChange'' (function reference) - callback that is called just > before the frame changes > > ''onAfterChange'' (function reference) - callback called after the frame > is changed > > ''startPaused'' (boolean - default false) - if you don''t want the > slideshow to start automatically, set this to true > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Roberto Saccon - http://rsaccon.com _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs