# Mac Dock like menu problems coding the array

**URL:** <https://forum.kirupa.com/t/mac-dock-like-menu-problems-coding-the-array/307008>\
**Category:** flash\
**Created:** [March 26, 2010, 2:57am UTC](https://forum.kirupa.com/t/mac-dock-like-menu-problems-coding-the-array/307008 "2010-03-26T02:57:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayfrenchdude](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jayfrenchdude](https://forum.kirupa.com/u/jayfrenchdude)\
**Post date:** [March 26, 2010, 2:57am UTC](https://forum.kirupa.com/t/mac-dock-like-menu-problems-coding-the-array/307008/1 "2010-03-26T02:57:11Z")

</div>

Guys I downloaded this cool Mac like Dock menu thing, I used my own icons and fit it in my FLA. It works great except I can’t understand how to code the .AS file to make it go where I want when I click the buttons.

You can preview the site at [www.maisontoe.com/new/index4.html](http://www.maisontoe.com/new/index4.html)

I am new with programming and I am used to making each button go to a specific location, something like : MovieClip(this.parent).container.gotoAndStop("");

In the script attached I see the mouse event with the CLICK function but I can’t figure out how to code it right to make each button go to a different frame since there’s only one function. hehe… I know it has to communicate with the array but I can’t figure it out. I have been fighting with this for 3 days now, I really need some help. I hope someone have 5 minutes to check it out for me. I would like the buttons to take me to a frame in a parent clip. If they were single buttons (my simple way to code! haha) I’d code it like this

gallery1.addEventListener(MouseEvent.CLICK,goThere1);  
function goThere1(e:MouseEvent){  
MovieClip(this.parent).content2.gotoAndStop(“gallery1”);

gallery2… gallery3… etc…

Thanks for helping me out. It would be very useful for me to understand the use of arrays! lol

Joel
