Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] Custom attribute for animation type

Expand Messages
  • Matt Sweeney
    Hi, The arguments are provided automatically during the animation. Easings that have extra args (overshoot, amplitude, period, etc.) use default values, but
    Message 1 of 2 , Dec 18, 2006
      Hi,

      The arguments are provided automatically during the animation.  Easings that have extra args (overshoot, amplitude, period, etc.) use default values, but you can modify by creating a custom wrapper.

      For example:

      var customBackIn = function(t, b, c, d, s) {
         var s = 2; // override default overshoot value
         return YAHOO.util.Easing.backIn(t, b, c, d, s);
      };

      var anim = new YAHOO.util.Anim('demo', { width: { to: 200} }, 1, customBackIn);


      Matt

      baldonazionale wrote:
      FROM the docs
      (http://developer.yahoo.com/yui/docs/YAHOO.util.Easing.html)
      
      elasticIn
         Number elasticIn ( t , b , c , d , p )
         Snap in elastic effect.
      
         Parameters:
         ...more...
      
      And this is my script:
      
      var anim = new YAHOO.util.Scroll('demo', { 
         scroll: { by: [0, 100] }
         }, 2.0, YAHOO.util.Easing.elasticIn); 
      
      
      How can I add the Parameters to the elasticIn in my script?
      thanks
      
      
      
       
      Yahoo! Groups Links
      
      <*> To visit your group on the web, go to:
          http://groups.yahoo.com/group/ydn-javascript/
      
      <*> Your email settings:
          Individual Email | Traditional
      
      <*> To change settings online go to:
          http://groups.yahoo.com/group/ydn-javascript/join
          (Yahoo! ID required)
      
      <*> To change settings via email:
          mailto:ydn-javascript-digest@yahoogroups.com 
          mailto:ydn-javascript-fullfeatured@yahoogroups.com
      
      <*> To unsubscribe from this group, send an email to:
          ydn-javascript-unsubscribe@yahoogroups.com
      
      <*> Your use of Yahoo! Groups is subject to:
          http://docs.yahoo.com/info/terms/
       
      
      
      
        

    Your message has been successfully submitted and would be delivered to recipients shortly.