FANDOM


More on Variables

In the More on Variables talk through on Khan Academy, Jessica lays the groundwork for teaching animation, by expanding the user's understanding of variables. Not only can a variable be used to move one shape, for example Winston's face, other variables like Winston's eyes and mouth can be tied into another variable. In this manner, multiple shapes can be moved as a unit.

The illustration from the talk through shows this. Originally, coded at the number 200, x replaces the x value of the yellow ellipse that makes up Winston's face. His left eye goes from being 150 to x - 50, as x is storing 200 to start and the left eye needs to start at the 150 position on the x marker. Though Jessica doesn't mention this, a user could use this strategy with the y position to make Winston move up and down.

☀ All Khan Academy content is available for free at: www.khanacademy.org

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.