# \[F8\] onClipEvent(enterFrame) for dynamically created MCs

**URL:** <https://forum.kirupa.com/t/f8-onclipevent-enterframe-for-dynamically-created-mcs/209400>\
**Category:** flash\
**Created:** [December 8, 2006, 1:32pm UTC](https://forum.kirupa.com/t/f8-onclipevent-enterframe-for-dynamically-created-mcs/209400 "2006-12-08T13:32:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jambro](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jambro](https://forum.kirupa.com/u/jambro)\
**Post date:** [December 8, 2006, 1:32pm UTC](https://forum.kirupa.com/t/f8-onclipevent-enterframe-for-dynamically-created-mcs/209400/1 "2006-12-08T13:32:31Z")

</div>

hello gurus,

i had four “widgets” on the screen that i had following around another “master” movieclip but repelling from oneanother…

initially i used this code in each clips timeline:  
onClipEvent (enterFrame) {  
and then set their new \_x and \_y depending ont he position of the master and other widgets.

this worked fine… however i wanted to dynamically generate the widgets so i could have as many onscreen as were present in an array on my main timeline.

i have been able to generate the clips fine, but i cannot use [onClipEvent (enterFrame) {] on them as they are in the main timeline! if i set up a “cheating loop” and run it through 200 times updating the widgets movement and they move to their correct position…

how do i have the array generated mc’s update their \_x and \_y position continuously?

regards and TIA  
JB
