# Making function to control nav, prototyping

**URL:** https://forum.kirupa.com/t/making-function-to-control-nav-prototyping/170669
**Category:** Uncategorized
**Created:** [November 28, 2005, 6:21pm UTC](https://forum.kirupa.com/t/making-function-to-control-nav-prototyping/170669 "2005-11-28T18:21:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![leadtrum](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leadtrum](https://forum.kirupa.com/u/leadtrum)
#### Post date: [November 28, 2005, 6:21pm UTC](https://forum.kirupa.com/t/making-function-to-control-nav-prototyping/170669/1 "2005-11-28T18:21:27Z")

</div>

i have this site i’m making a lot of navigation items that all follow the same type of animation.

i want to have a centralized location where i can change how the animation looks and have it affect all the items.

so far i had an idea like this:

```auto

function changeNav(navitem:MovieClip):Void {
     navitem.tween("_x", 2, "easeOutSine");
}  

```

then i call it with a rollover button

```auto

nav_mc.main_butt.onRelease = function():Void {
     changeNav(main);
}

```

basically i try a trace function and it returns undefined so I’m guessing there’s something wrong in my syntax. any suggestions? its like its not passing the movieclip name as a variable let alone executing the tween function.
