# GOIN' INSANE, Can't call functions

**URL:** https://forum.kirupa.com/t/goin-insane-cant-call-functions/191665
**Category:** flash
**Created:** [June 22, 2006, 4:11am UTC](https://forum.kirupa.com/t/goin-insane-cant-call-functions/191665 "2006-06-22T04:11:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kikon](https://avatars.discourse-cdn.com/v4/letter/k/f05b48/32.png) [@kikon](https://forum.kirupa.com/u/kikon)
#### Post date: [June 22, 2006, 4:11am UTC](https://forum.kirupa.com/t/goin-insane-cant-call-functions/191665/1 "2006-06-22T04:11:17Z")

</div>

hello everybody!

I’m going insane. Here is a simple example of something that’s causing me trouble:  
The following code is in the first keyframe of the animation, the object to be animated is a circle. When you call both funtions, only one of them executes. The circle will only move in the y direction! if you comment out calling the second funtion, THEN if moves in the x direction. Why is this?

function one() {  
this.onEnterFrame = function() {  
circle.\_x += 10;  
};  
}  
function two() {  
this.onEnterFrame = function() {  
circle.\_y += 10;  
};  
}  
one();  
two();

Obviously, this isn’t what I’m working on. This is just to show where my main problem is. PLEASE someone help me!
