# \[AS2\] Call a custom function from another custom function's parameter?

**URL:** <https://forum.kirupa.com/t/as2-call-a-custom-function-from-another-custom-functions-parameter/256261>\
**Category:** flash\
**Created:** [April 1, 2008, 1:24pm UTC](https://forum.kirupa.com/t/as2-call-a-custom-function-from-another-custom-functions-parameter/256261 "2008-04-01T13:24:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![komapeb](https://avatars.discourse-cdn.com/v4/letter/k/8e7dd6/32.png) [@komapeb](https://forum.kirupa.com/u/komapeb)\
**Post date:** [April 1, 2008, 1:24pm UTC](https://forum.kirupa.com/t/as2-call-a-custom-function-from-another-custom-functions-parameter/256261/1 "2008-04-01T13:24:05Z")

</div>

Hello there!  
This is my second post in this forum 😃  
Here is the problem:

I want to call a function from another function’s parameter but I don’t know how and don’t know if it is possible.

I’ve considered this as a solution but it didn’t worked.

```auto

function myFunc(target_mc:MovieClip, nX:Number, nY:Number, [COLOR=Red] **cFunc:Function** [/COLOR]) {
     target_mc._x += nX;
     targen_mc._y += nY;[COLOR=Red]
     [/COLOR][COLOR=Red] **target_mc.onPress = cFunc** ;[/COLOR]
}
function go() {
//some code goes here
}[COLOR=Red]
**myFunc(my_mc,50,50,go);**[/COLOR] 

```

I hope you get the idea.

[SIZE=1]Sorry for my English :)[/SIZE]
