# Override question

**URL:** <https://forum.kirupa.com/t/override-question/263111>\
**Category:** Uncategorized\
**Created:** [June 12, 2008, 5:24pm UTC](https://forum.kirupa.com/t/override-question/263111 "2008-06-12T17:24:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [June 12, 2008, 5:24pm UTC](https://forum.kirupa.com/t/override-question/263111/1 "2008-06-12T17:24:33Z")

</div>

i have a piece of code in a layer in the timeline of course to ask a movie clip to do something… but i also have another piece of code inside this movie clip to do something as well… what does get override if so?

thanks.I:-)

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [June 12, 2008, 6:22pm UTC](https://forum.kirupa.com/t/override-question/263111/2 "2008-06-12T18:22:30Z")

</div>

I would expect the \_root code (i.e. the timeline code) to be called first, followed (and then possibly over-ridden) by, the movieclip code. For example, place the following code onto frame 1:  
gotoAndPlay(10);  
Also place a movieclip onto frame 1 and attach the following code to the instance:  
onClipEvent(load) {  
gotoAndPlay(20);  
}  
In frame 10, place a stop();

Test the file and you will see that, no matter what you do, the playhead always goes to frame 10. This is because the timeline code is being triggered before the movieclip timeline is loaded. Changing the onClipEvent to enterFrame produces the same result. Even changing it to mouseMove won’t trigger it because the \_root timeline always kicks in first.
