Advertisement
Guest User

FramerJS animation glitch

a guest
Oct 22nd, 2014
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. newLayer = new Layer
  2.     x: 320, y: 600, backgroundColor:"white", width: 200, height: 150
  3.    
  4. newAnimation = new Animation
  5.     layer: newLayer
  6.     properties:
  7.         rotationZ: 360
  8.     time: 5
  9.     repeat: 10000
  10.  
  11. newAnimationFast = new Animation
  12.     layer: newLayer
  13.     properties:
  14.         rotationZ: 360
  15.     time: 0.5
  16.     repeat: 10000
  17.  
  18. fast = false
  19. newAnimation.start()
  20. newLayer.on Events.Click, ->
  21.     if !fast
  22.         print "Fast!"
  23.         newAnimation.stop()
  24.         newAnimationFast.start()
  25.         fast = true
  26.     else if fast
  27.         print "Slow!"
  28.         newAnimationFast.stop()
  29.         newAnimation.start()
  30.         fast = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement