# Is there a performance difference among having 2 enterFrames over 1 object or

**URL:** https://forum.kirupa.com/t/is-there-a-performance-difference-among-having-2-enterframes-over-1-object-or/305625
**Category:** Uncategorized
**Created:** [February 28, 2010, 11:46pm UTC](https://forum.kirupa.com/t/is-there-a-performance-difference-among-having-2-enterframes-over-1-object-or/305625 "2010-02-28T23:46:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cpucpu](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@cpucpu](https://forum.kirupa.com/u/cpucpu)
#### Post date: [February 28, 2010, 11:46pm UTC](https://forum.kirupa.com/t/is-there-a-performance-difference-among-having-2-enterframes-over-1-object-or/305625/1 "2010-02-28T23:46:42Z")

</div>

Is there any performance difference among having 2 enterFrames over 1 object ‘N’; or having 1 enterFrame over the same object ‘N’.

ie:  
_//from objectA_  
main.addEventListener(Event.ENTER\_FRAME, onEnterA);  
funtion onEnterA(){  
//objectA actions  
}

_//from objectB_  
main.addEventListener(Event.ENTER\_FRAME, onEnterB);  
funtion onEnterB(){  
//objectB actions  
}

VS

//from main  
this.addEventListener(Event.ENTER\_FRAME, onEnterMain);  
funtion onEnterMain(){  
//objectA actions  
//objectB actions  
}
