# Where is the most suitable place of placing the code

**URL:** <https://forum.kirupa.com/t/where-is-the-most-suitable-place-of-placing-the-code/2820>\
**Category:** Uncategorized\
**Created:** [April 5, 2002, 8:26am UTC](https://forum.kirupa.com/t/where-is-the-most-suitable-place-of-placing-the-code/2820 "2002-04-05T08:26:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 5, 2002, 8:26am UTC](https://forum.kirupa.com/t/where-is-the-most-suitable-place-of-placing-the-code/2820/1 "2002-04-05T08:26:35Z")

</div>

Hi everyone,\r\rI want to add a code to a M.C to control its continous movement in flash5 A.S.where is the most efficient place from a performance perspective for the code? In\r\r1) The timeline which contains the M.C\r2)The timeline of the M.C, duplicated over the first two frames with no other frames\r3) an onClipEvent(load) event handler located on the M.C itself with no frames within the M.c\r4)An onClipEvent(enterframe) event handler located on an additional M.C located on the first frame of M.C’s timeline with no other frames. \r\rPls.help me out with this prob. along with the reason of adopting the given option.\r\rThanks in Adv.\rSonia

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 5, 2002, 9:22am UTC](https://forum.kirupa.com/t/where-is-the-most-suitable-place-of-placing-the-code/2820/2 "2002-04-05T09:22:42Z")

</div>

The only one that makes a difference at all is the onClipEvent(enterFrame). That one will check something over and over again in a loop, as long as it exists on the timeline. The other options are better, if you can do it that way, and any of them will pretty much be the same on the processor.
