# Question about Spring/Elasticity Tutorial

**URL:** <https://forum.kirupa.com/t/question-about-spring-elasticity-tutorial/233167>\
**Category:** flash\
**Created:** [July 20, 2007, 6:33pm UTC](https://forum.kirupa.com/t/question-about-spring-elasticity-tutorial/233167 "2007-07-20T18:33:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakattak](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jakattak](https://forum.kirupa.com/u/jakattak)\
**Post date:** [July 20, 2007, 6:33pm UTC](https://forum.kirupa.com/t/question-about-spring-elasticity-tutorial/233167/1 "2007-07-20T18:33:46Z")

</div>

I was looking through an old Kirupa tutorial:  
[http://www.kirupa.com/developer/actionscript/spring.htm](http://www.kirupa.com/developer/actionscript/spring.htm)

I’ve used this before, and it always works perfectly. Something that I have never been able to understand, however, are the following lines:

xp = xp \* inertia + x_k ;  
yp = yp \* inertia + y_k ;

The thing that confuses me about these lines are xp and yp never seem to be declared or set with any initial values before they hit the function, so I keep thinking xp and yp should end up being 0 or undefined (which they obviously aren’t.) Where is Flash getting the xp and yp values initially? Anyone know? Am I just overlooking something?
