# Calling 2 functions in a function.... only the last one called

**URL:** https://forum.kirupa.com/t/calling-2-functions-in-a-function-only-the-last-one-called/107683
**Category:** Uncategorized
**Created:** [April 17, 2004, 11:58pm UTC](https://forum.kirupa.com/t/calling-2-functions-in-a-function-only-the-last-one-called/107683 "2004-04-17T23:58:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ling\_Nightsky](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@Ling\_Nightsky](https://forum.kirupa.com/u/Ling_Nightsky)
#### Post date: [April 17, 2004, 11:58pm UTC](https://forum.kirupa.com/t/calling-2-functions-in-a-function-only-the-last-one-called/107683/1 "2004-04-17T23:58:46Z")

</div>

```auto

function1 = function() {
	this.onEnterFrame = function() {
		function2();
		function3();
	}
}

function2 = function(){
	this.onEnterFrame = function() {
		trace("function 2 activated!");
	}
}

function3 = function(){
	this.onEnterFrame = function() {
		trace("function 3 activated!");
	}
}

function1();

```

try this code… it only trace function3

i’m wondering why? is it because of the onEnterFrame in the functions?
