# Adding functions to a dynamic MC

**URL:** <https://forum.kirupa.com/t/adding-functions-to-a-dynamic-mc/252070>\
**Category:** Uncategorized\
**Created:** [February 15, 2008, 3:35pm UTC](https://forum.kirupa.com/t/adding-functions-to-a-dynamic-mc/252070 "2008-02-15T15:35:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [February 15, 2008, 3:35pm UTC](https://forum.kirupa.com/t/adding-functions-to-a-dynamic-mc/252070/1 "2008-02-15T15:35:52Z")

</div>

Hello.  
i were trying to add onRollOver to a movieclip that i loaded with loadMovie().  
But i were unable to give the MC functions.  
How would i add functions to a external MC?  
I did like this (Wrote from top of my head, sry for syntax error)

```
 ActionScript Code:
 [FONT=Courier New][LEFT]container.[COLOR=#0000ff]loadMovie[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"dummy.swf"[/COLOR][COLOR=#000000])[/COLOR];

```

container.[COLOR=#0000ff]onRollOver[/COLOR] = [COLOR=#000000] **function** [/COLOR] COLOR=#000000[/COLOR][COLOR=#000000]{[/COLOR]  
[COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]  
[/FONT]

The onRollOver function do not work,but the movie gets loaded, any ideas on how to work around it?
