Hi, Is there migration for custom Effect between prototype/scriptaculous 1.4 and 1.5 ? Kevin Davis send me it''s cool Poof Effect but it seems to be tooooo fast in last version of scriptaculous. I think it comes from the code ? But I don''t know the best way to correct that ? Here is a copy/past of his mail for anybody interested in his Effect:> > Hey there, sorry for the delay getting back to you. > > I hope to have a ''projects'' section of my site up again someday soon, but > until then take a look at the attached. > > Feel free to use, just put a link to my site or something? > > Don''t use the images though, they''re taken from the panic site.. and I > suspect they found them in some resource file from Apple. > > If you know anyone on the scriptaculous team tell them :) > > Kevin >Regards, -- Jean-Philippe Encausse - Veille / R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Try: new Effect.Poof(element.id,imgs, {fps: 1}); You can adjust the fps as you like, defaults to 15.> Hi, > > Is there migration for custom Effect between prototype/scriptaculous > 1.4 and 1.5 ? > > > Kevin Davis send me it''s cool Poof Effect but it seems to be tooooo > fast in last version of scriptaculous. I think it comes from the code > ? But I don''t know the best way to correct that ? > > > Here is a copy/past of his mail for anybody interested in his Effect: > > >> Hey there, sorry for the delay getting back to you. >> >> I hope to have a ''projects'' section of my site up again someday soon, but >> until then take a look at the attached. >> >> Feel free to use, just put a link to my site or something? >> >> Don''t use the images though, they''re taken from the panic site.. and I >> suspect they found them in some resource file from Apple. >> >> If you know anyone on the scriptaculous team tell them :) >> >> Kevin >> >> > > Regards, >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks, But it seems to be really fast even if I set 1 or 15, may be it comes from my application ? I call the effect on a floatable DIV. It is like theses values are not used ... may be there is a function in 1.5 to implements that didn''t exists in previous version ? Regards, Jp On 6/28/07, Ian <ityndall-ue636x8T32g@public.gmane.org> wrote:> > Try: > > new Effect.Poof(element.id,imgs, {fps: 1}); > > You can adjust the fps as you like, defaults to 15. > > Hi, > > Is there migration for custom Effect between prototype/scriptaculous > 1.4 and 1.5 ? > > > Kevin Davis send me it''s cool Poof Effect but it seems to be tooooo > fast in last version of scriptaculous. I think it comes from the code > ? But I don''t know the best way to correct that ? > > > Here is a copy/past of his mail for anybody interested in his Effect: > > > > Hey there, sorry for the delay getting back to you. > > I hope to have a ''projects'' section of my site up again someday soon, but > until then take a look at the attached. > > Feel free to use, just put a link to my site or something? > > Don''t use the images though, they''re taken from the panic site.. and I > suspect they found them in some resource file from Apple. > > If you know anyone on the scriptaculous team tell them :) > > Kevin > > > Regards, > > > > > >-- Jean-Philippe Encausse - Veille / R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey JP, Jean-Philippe Encausse a écrit :> But it seems to be really fast even if I set 1 or 15, may be it comes > from my application ?OK, did you set the duration? An effect defaults to 1 second, so you might think it way too fast for your needs. I looked at the effect''s code, and it does seem to use fps and duration correctly (at least from a cursory glance). -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Yes I try to set 4.0 but it seems not to work Here is what I do: new Effect.Poof(msg, arrayOfImages, { duration: 4.0, afterFinish: function(){ ... } }); And the copy/past effect: Effect.Poof = Class.create(); Object.extend(Object.extend(Effect.Poof.prototype,Effect.Base.prototype),{ initialize: function(element,images) { var options = arguments[2] || {}; // options if(!options.fps) options.fps = 15.0; if(!options.duration) options.duration = (1.0 / options.fps) * images.length; // start at the first image this.current = 0; this.poofers = images; this.element = $(element); this.oldChild = this.element.firstChild; this.element.removeChild(this.element.firstChild); // ** I''d like to replaces these lines with a setOpacity this.oldBG = this.element.style.backgroundColor; this.element.style.backgroundColor = ''transparent''; this.oldBorder = this.element.style.border; this.element.style.border = ''none''; // Element.setOpacity(this.element,0); this.start(options); }, update: function(position){ if(this.element.firstChild) this.element.removeChild(this.element.firstChild); if(this.current < this.poofers.length) { this.element.appendChild(this.poofers[this.current]); } this.current++; }, finish: function(position){ this.element.style.display = ''none''; if(this.element.firstChild) this.element.removeChild(this.element.firstChild); this.element.appendChild(this.oldChild); // ** want to remove these lines this.element.style.backgroundColor = this.oldBG; this.element.style.border = this.oldBorder; } }); On 6/28/07, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> > Hey JP, > > Jean-Philippe Encausse a écrit : > > But it seems to be really fast even if I set 1 or 15, may be it comes > > from my application ? > > OK, did you set the duration? An effect defaults to 1 second, so you > might think it way too fast for your needs. I looked at the effect''s > code, and it does seem to use fps and duration correctly (at least from > a cursory glance). > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >-- Jean-Philippe Encausse - Veille / R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ooopsss I''m really really sorry ! After test and trying to isolate what doesn''t work I see a function call that bybass the effect that''s why it was so fast ... Arfff I''m blind !!!!! Sorry, Jp On 7/7/07, Jean-Philippe Encausse <Jp-vcK5r0oTKUrk1uMJSBkQmQ@public.gmane.org> wrote:> Yes I try to set 4.0 but it seems not to work > > Here is what I do: > > new Effect.Poof(msg, arrayOfImages, { > duration: 4.0, > afterFinish: function(){ ... } > }); > > And the copy/past effect: > > Effect.Poof = Class.create(); > Object.extend(Object.extend(Effect.Poof.prototype,Effect.Base.prototype),{ > initialize: function(element,images) { > var options = arguments[2] || {}; > > // options > if(!options.fps) options.fps = 15.0; > if(!options.duration) options.duration = (1.0 / options.fps) * > images.length; > > > // start at the first image > this.current = 0; > this.poofers = images; > > this.element = $(element); > this.oldChild = this.element.firstChild; > this.element.removeChild(this.element.firstChild); > > // ** I''d like to replaces these lines with a setOpacity > this.oldBG = this.element.style.backgroundColor; > this.element.style.backgroundColor = ''transparent''; > this.oldBorder = this.element.style.border; > this.element.style.border = ''none''; > > // Element.setOpacity(this.element,0); > this.start(options); > }, > > update: function(position){ > if(this.element.firstChild) > this.element.removeChild(this.element.firstChild); > > if(this.current < this.poofers.length) > { > this.element.appendChild(this.poofers[this.current]); > } > this.current++; > }, > > finish: function(position){ > this.element.style.display = ''none''; > if(this.element.firstChild) > this.element.removeChild(this.element.firstChild); > this.element.appendChild(this.oldChild); > > // ** want to remove these lines > this.element.style.backgroundColor = this.oldBG; > this.element.style.border = this.oldBorder; > > } > }); > > > > On 6/28/07, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > > > Hey JP, > > > > Jean-Philippe Encausse a écrit : > > > But it seems to be really fast even if I set 1 or 15, may be it comes > > > from my application ? > > > > OK, did you set the duration? An effect defaults to 1 second, so you > > might think it way too fast for your needs. I looked at the effect''s > > code, and it does seem to use fps and duration correctly (at least from > > a cursory glance). > > > > -- > > Christophe Porteneuve a.k.a. TDD > > "[They] did not know it was impossible, so they did it." --Mark Twain > > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > > > > > > > > > -- > Jean-Philippe Encausse - Veille / R&D Jalios SA > Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com > GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net > Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 > Do it Once, Use it Twice ~ Do it Twice, Make It Once >-- Jean-Philippe Encausse - Veille / R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33682125699 - Job: +33139239283 - Tel: +33139189015 - Fax: +33958789015 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---