[Proto-Scripty] Re: How to create slideshow type effect?
Thanks for your response Patrick, works perfectly. Sorry for the long delay! On 23 May, 18:48, patrick wrote: > What you could do is set a variable when the fade begins, and reset it > when it ends, and then limit your tab buttons from having action if > the fade is in progress. > > so it would look like: > > // inside tab click function: > if (this.fade_in_progress) { > return false; > > } > > and then you'd do something like: > > this.fade_in_progress = true; > pageElement.fade({ duration: 1.0, to: 1.0, afterFinish: function() > { this.fade_in_progress = false; }.bind(this) }); > > -patrick > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to prototype-scriptacul...@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: How to create slideshow type effect?
What you could do is set a variable when the fade begins, and reset it when it ends, and then limit your tab buttons from having action if the fade is in progress. so it would look like: // inside tab click function: if (this.fade_in_progress) { return false; } and then you'd do something like: this.fade_in_progress = true; pageElement.fade({ duration: 1.0, to: 1.0, afterFinish: function() { this.fade_in_progress = false; }.bind(this) }); -patrick -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: How to create slideshow type effect?
Sorry, I miss-typed my code when I was writing this message, I missed the "from" attributes. // Hide last page? if (this.pageIndex != -1) this.pages[this.pageIndex].fade({ duration: 1.0, from: 1.0, to: 0.0 }); // Show selected page! var pageElement = this.pages[index]; pageElement.style.opacity = '0.0'; pageElement.show(); pageElement.fade({ duration: 1.0, from: 0.0, to: 1.0 }); On May 22, 2:21 am, Kruncher wrote: > Hi, > > I am new to script.aculo.us so please excuse my ignorance. I am > attempting to create a slide-show effect similar to the one on the > steam website:http://store.steampowered.com/ > > I have a container DIV and several alternative inner DIV elements. I > have several tab-like buttons which when pressed fade the current > image out and another in. This is kind of working, but if you press a > tab button whilst an image is fading then both images disappear. > > Additionally both images suddenly flick to being fully opaque or fully > transparent upon interuption. > > // Hide last page? > if (this.pageIndex != -1) > this.pages[this.pageIndex].fade({ duration: > 1.0, to: 0.0 }); > > // Show selected page! > var pageElement = this.pages[index]; > pageElement.style.opacity = '0.0'; > pageElement.show(); > pageElement.fade({ duration: 1.0, to: 1.0 }); > > Any help would be greatly appreciated! > > Kind regards, > Lea Hayes > > -- > You received this message because you are subscribed to the Google Groups > "Prototype & script.aculo.us" group. > To post to this group, send email to prototype-scriptacul...@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/prototype-scriptaculous?hl=en. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.