I have a dynamic menu system that I just developed for a client. The movie clip buttons dynamically duplicate by the number of records pulled from the database and the button labels dynamically populate based on the values in the field.

I ran into a problem when trying to get the buttons to actually do something when pressed. I figured I could just code the button actions to pull the data the same way as I populated the button labels. The button lables populate from a field called "Cat" and the action should be pulled from a field called "CatLink". The "CatLink" field holds the value of the .swf file to load into the movie.

The following code is what I used to populate the lables:

thisClip.Button_txt.text = result.items[i].Cat;

Here is what I've used to TRY and set the actions:

_root["button"+i].onRelease = function() {
loadMovieNum(result.items[i].CatLink,1);
}

If anyone has ran into this situation, or know some way to make this work, your help will be much appreciated.

Thanks in advance,

Scott