# \[FMX\] Function after function

**URL:** <https://forum.kirupa.com/t/fmx-function-after-function/104089>\
**Category:** Uncategorized\
**Created:** [March 12, 2004, 6:36am UTC](https://forum.kirupa.com/t/fmx-function-after-function/104089 "2004-03-12T06:36:51Z")\
**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 12, 2004, 6:36am UTC](https://forum.kirupa.com/t/fmx-function-after-function/104089/1 "2004-03-12T06:36:51Z")

</div>

Hi,

I have a menu that appears on the stage with the following function (thank you divarch for making me undestand functions way better )

[AS]function moveMenu (clip, yPos, speed){  
clip.onEnterFrame=function(){  
var endPos = yPos-this.\_y;  
this.\_y += endPos/speed;  
}  
}  
moveMenu (menu, 50, 3);[/AS]

Next to the menu I have a movieclip (instance name “square”) which I want to appear on the stage from the left, but not before menu (see above) has reached it’s final position. How do I integrate this in the above function or should I make a seperate function for this :q:
