Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newLayer = new Layer
- x: 320, y: 600, backgroundColor:"white", width: 200, height: 150
- newAnimation = new Animation
- layer: newLayer
- properties:
- rotationZ: 360
- time: 5
- repeat: 10000
- newAnimationFast = new Animation
- layer: newLayer
- properties:
- rotationZ: 360
- time: 0.5
- repeat: 10000
- fast = false
- newAnimation.start()
- newLayer.on Events.Click, ->
- if !fast
- print "Fast!"
- newAnimation.stop()
- newAnimationFast.start()
- fast = true
- else if fast
- print "Slow!"
- newAnimationFast.stop()
- newAnimation.start()
- fast = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement