# Help creating a completely dynamic navigation

**URL:** https://forum.kirupa.com/t/help-creating-a-completely-dynamic-navigation/198055
**Category:** Uncategorized
**Created:** [August 22, 2006, 2:40am UTC](https://forum.kirupa.com/t/help-creating-a-completely-dynamic-navigation/198055 "2006-08-22T02:40:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nb3004](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@nb3004](https://forum.kirupa.com/u/nb3004)
#### Post date: [August 22, 2006, 2:40am UTC](https://forum.kirupa.com/t/help-creating-a-completely-dynamic-navigation/198055/1 "2006-08-22T02:40:57Z")

</div>

I am working on a navigation for a page that consists of an image container, a text block, and a navigation. I have all the content in an xml file that is loaded and parsed placing each part of the site in its respectable spot. My question is I need to have the data for this site change when a button in the nav is pressed, so that the image and desc content is passed that corresponds to its button. this is in flash 8, as 2.0.

```auto
//import xml
var x:XML = new XML();
x.load("group.xml");
x.ignoreWhite = true;
//load in xml
x.onLoad = function(success) {
    if (success) {
        //
        /*trace(x.firstChild.childNodes[0].attributes.moniker);
        trace(x.firstChild.childNodes[0].attributes.image);
        trace(x.firstChild.childNodes[0].attributes.desc);*/
        //
        var names:Array = new Array();
        var picts:Array = new Array();
        var desc:Array = new Array();
        var ourContent:Array = x.firstChild.childNodes;
        var nav:Array = new Array();
        //
        yPos = 40;
        for (var i:Number = 0; i < ourContent.length; i++) {
            //push the content
            names.push(ourContent*.attributes.moniker);
            picts.push(ourContent*.attributes.images);
            desc.push(ourContent*.attributes.desc);
            //load onto the stage
            descBlock.text = desc[0];
            faceContainer.loadMovie(picts[0], 0);
            nav = attachMovie('navNames', 'navButton' + i, i, {_x:70, _y:yPos});
            nav.menuText.text = names*;
            yPos = nav._y + 20;
            //
            nav.onRelease = function() {
                 ////problem area
                descBlock.text = desc*;
                faceContainer.loadMovie(picts*, i);
            };
        }
    } else {
        trace("error loading xml");
    }
};

//
import mx.transitions.Tween;
import mx.transitions.easing.*;
//
new mx.transitions.Tween(theGroup, "_x", mx.transitions.easing.Strong.easeOut, 327.5, 20, 30, false);
new mx.transitions.Tween(theGroup, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 30, false);
///

```

thanks in advance
