# Changing the function

**URL:** <https://forum.kirupa.com/t/changing-the-function/175632>\
**Category:** Uncategorized\
**Created:** [January 16, 2006, 4:56pm UTC](https://forum.kirupa.com/t/changing-the-function/175632 "2006-01-16T16:56:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zephn](https://avatars.discourse-cdn.com/v4/letter/z/5f8ce5/32.png) [@zephn](https://forum.kirupa.com/u/zephn)\
**Post date:** [January 16, 2006, 4:56pm UTC](https://forum.kirupa.com/t/changing-the-function/175632/1 "2006-01-16T16:56:03Z")

</div>

The following code is what I use for creating a menu of links to add to my website. currently it opens a new window and loads a website into that window. An example of this can be found on one of the first sites I ever did [www.zephn.com/trpa](http://www.zephn.com/trpa) on the bottom left of the main page.

I want to change the function to load a movieclip into a container i have set up in my main movie. I created a little site for my video game friends at [www.zephn.com/wowmovies](http://www.zephn.com/wowmovies) and want to use the menu this code relates to.

I tried subsituting the openwinCentre command with

loadmovie (siteToLoad,“imagelist”);

This did not work. Am I tackling this from the wrong point of view?

var menuItems = [“The Gates of AQ”];

var siteList = [“aq1.swf”];

for (i=0; i\<menuItems.length; i++) {  
var mc = container.dynamicButton.duplicateMovieClip(“button”+i, i);  
mc.menuLabel.text = menuItems\*;  
mc.\_y = i\*(mc.\_height-1);  
mc.siteToLoad = siteList\*;  
mc.actualButton.onPress = function() {  
openWinCentre(this.\_parent.siteToLoad, “TRPA”, 780, 640, 1, 1, 1, 1, 1, 1, 1);  
};  
}
