# Post Your ActionScript "Phrases"

**URL:** <https://forum.kirupa.com/t/post-your-actionscript-phrases/191962>\
**Category:** flash\
**Created:** [June 24, 2006, 2:00pm UTC](https://forum.kirupa.com/t/post-your-actionscript-phrases/191962 "2006-06-24T14:00:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GNXDan](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@GNXDan](https://forum.kirupa.com/u/GNXDan)\
**Post date:** [June 24, 2006, 2:00pm UTC](https://forum.kirupa.com/t/post-your-actionscript-phrases/191962/1 "2006-06-24T14:00:37Z")

</div>

Hey  
I was thinking that I use the same old bits of code over and over again. I’ve decided to call these “phrases”. I thought it would be cool if I made this thread were everyone can post their little bits and pieces of re-usable code so everyone can benifit.

Here are mine:

obj.\_x += (endingX-obj.\_x)/6 - a smooth moving motion to the endingX when used onEnterFrame

myObj = attachMovie(“obj”,“obj”+i,i) - usefull in a for loop after that you can set myObj.\_x etc

trace(1000/(getTimer()-T));  
T = getTimer(); - find out your fps by putting these two lines in onEnterFrame

dx = firstX-secondX;  
dy = firstY-secondY;  
radius = Math.sqrt(dx_dx+dy_dy); - find the length between 2 points

Hope this is usefull.  
Post all your phrases bellow!  
A big actionScript phrase dictionary would be cool aswell! 😃
