# Call custom function in loaded clip

**URL:** <https://forum.kirupa.com/t/call-custom-function-in-loaded-clip/252953>\
**Category:** flash\
**Created:** [February 25, 2008, 8:59pm UTC](https://forum.kirupa.com/t/call-custom-function-in-loaded-clip/252953 "2008-02-25T20:59:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiropole](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jiropole](https://forum.kirupa.com/u/jiropole)\
**Post date:** [February 25, 2008, 8:59pm UTC](https://forum.kirupa.com/t/call-custom-function-in-loaded-clip/252953/1 "2008-02-25T20:59:21Z")

</div>

Hi,

I’m wondering if anyone knows a way to get around this:

\*1061: Call to a possibly undefined method setLevel through a reference with static type flash.display:DisplayObject. error in AS3  
\*  
This is a situation in which I load an external movieclip (using Loader) and then want to call a function I’ve defined in the clip’s DocumentClass, called setLevel(). I want to be able to specify a custom clip through flashvars whose only requirement is that it support this function, so the binding is unknown at compile time.

Is there a way to do this, or am I going about it the wrong way?

Thanks,  
Jiropole
