Lab 6 Reflection


For lab 6 we had to use what we learned in lab 4 to animate a box in the same way. I
t was basically like a redo of lab 5 but with a stop button included.
Although, in this lab we had to include a “stop” button which, when pressed, will stop the animation currently in progress. For example, if you clicked on the move animation, originally, the box would move from its initial position to wherever it’s ending position is. With the stop button you can stop the animation halfway through so the box only moves halfway to were it was supposed to be. The set up for this is the same to the lab 4. First, we create the stop button in HTML whilst giving it an ID so that we can call it with a JQuery selector. In your javascript file you add an event listener to the stop button. Then if the button is pressed you use the built in JQuery function “.stop()” which stops the animations.

Comments

Popular posts from this blog

Difference between 300ppi and 72ppi

CTE Expo