# Works in FL7 but not FL8

**URL:** https://forum.kirupa.com/t/works-in-fl7-but-not-fl8/191045
**Category:** flash
**Created:** [June 16, 2006, 4:22pm UTC](https://forum.kirupa.com/t/works-in-fl7-but-not-fl8/191045 "2006-06-16T16:22:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Artofacks1](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Artofacks1](https://forum.kirupa.com/u/Artofacks1)
#### Post date: [June 16, 2006, 4:22pm UTC](https://forum.kirupa.com/t/works-in-fl7-but-not-fl8/191045/1 "2006-06-16T16:22:08Z")

</div>

Any body knows why the code below would work in 7 and not when published as fl 8. What it does is onRelease it makes a submenu but for some reason it is not functioning. Thanks In advance for your help.

```auto

//Load Xml
myXML = new XML();
myXML.ignoreWhite = true;
myXML.load("xml/menu.xml");
//Check if its loaded successfully
function handleLoad(status) {
    status ? makeMenu() : trace("Error parsing XML.");
}
myXML.onLoad = handleLoad;
//Build Menu headings
function makeMenu() {
    //limkage name of btn mc clip
    myItem = "heading";
    myX = 0;
    myY = 0;
    //goto the first heading node and count the number of menu
    //heading nodes
    for (i=0; i&lt;myXML.firstChild.childNodes.length; i++) {
        //get id node value and assign each heading btnLabel
        //var
        btnLabel = (myXML.firstChild.childNodes*.attributes.id);
        // create a new headings item to the id value of the heading
        this.attachMovie(myItem, btnLabel, i+10);
        thisItem = this[btnLabel];
        //change the heading id value of the heading
        thisItem.btnLabel = (btnLabel);
        thisItem._x = myX += (thisItem._width)+2;
        thisItem._y = myY;
        thisItem.onRelease = function() {
            xPos = this._x;
            yPos = this._y;
            makeSubMenu(this.btnLabel, xPos, yPos);
        };
    }
}
//subMenu
function makeSubMenu(subMenuID, xPos, yPos) {
    subItem = "subMenu";
    unloadSubMenu();
    itemsLoaded = new Array();
    for (i=0; i&lt;myXML[subMenuID].childNodes.length; i++) {
        btnSubLabel = (myXML[subMenuID].childNodes*.attributes.id);
        link = (myXML[subMenuID].childNodes*.attributes.link);
        this.attachMovie(subItem, btnSubLabel, i+100);
        thisItem = this[btnSubLabel];
        itemsLoaded.push(btnSubLabel);
        thisItem.btnSubLabel = (btnSubLabel);
        thisItem.link = (link);
        thisItem._x = xPos;
        thisItem._y = yPos += (thisItem._height);
    }
    thisItem.onRelease = function() {
        openLink(this.link);
    };
}

[/AS]
```
