Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. animation act weird when pressing play twice
  2. function moveRect1()
  3.         {      
  4.             // Reverse.uppfÖrande
  5.             if( xEnd == 150 )
  6.                 xEnd = 50;
  7.             else
  8.                 xEnd = 150;
  9.  
  10.             // x heter x på rektanglar. Vänstra övre hörnet.
  11.             rect1.animate( {x: xEnd},                       // det/de attribut som ska animeras, och till vilket värde.
  12.                             1000,                                   // tid
  13.                             "Sine",                         // Ease funktion
  14. function (){ moveRect1(); } //
  15.         ); // end animation
  16.  
  17.         }