Web programming 10 Reactive Animations Subscribe Pub Share

Previous Web programming 9 Functions.

Ok, let's go back to our animation problem: we made the ball move to the right, but we had no way to move it back... we had no way to wait for the ball to stop moving. But then we saw about functions and that Raphael can call a function when an animation is done, so now we have a pretty good idea how to move the ball back, don't we:

Ok - this is getting a little complicated, so we'll take a break here.

Homework:

  • make the ball green
  • create a new done() function to alert us when the ball reached the second position
  • make the ball move down and then up instead of right and then left

When ready, continue to Web programming 11 Complex Animations.


Was this useful?    

By: Razie | 2014-06-19 | Tags: post , html , lesson , hacker.factory , javascript , animation , raphael


See more in: Cool Scala Subscribe

Viewed 1121 times ( | History | Print ) this page.

You need to log in to post a comment!