# \[FMX\] Call back a function

**URL:** <https://forum.kirupa.com/t/fmx-call-back-a-function/105973>\
**Category:** Uncategorized\
**Created:** [March 31, 2004, 6:09pm UTC](https://forum.kirupa.com/t/fmx-call-back-a-function/105973 "2004-03-31T18:09:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dboers](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@dboers](https://forum.kirupa.com/u/dboers)\
**Post date:** [March 31, 2004, 6:09pm UTC](https://forum.kirupa.com/t/fmx-call-back-a-function/105973/1 "2004-03-31T18:09:35Z")

</div>

Hi,

I have a made function to control the alpha of a few squares. The function looks like this:

[AS]function fadeSq (clip, fade, speed){  
clip.onEnterframe= function(){  
var fadeOut = fade - this.\_alpha;  
this.\_alpha += fadeOut /speed;  
}  
}[/AS]

I know that I can call that function for one mc with:

[AS]fadeSq (square1, 0, 4);[/AS]

But is it also posibe to call the function for let’s say seven mc’s at once. I mean without writing seven lines of scrip?

Thanks in advance 😉
