A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: xml menu

Threaded View

  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    51

    xml menu

    Hi I am using this movie attached ,but i need to move the whole list down as it loses the top one of the screen the action script is.
    i tried to make varible i=40, but this makes all the items space out by 40,
    anyone help.

    menuXml = new XML();
    menuXml.ignoreWhite = true;
    menuXml.onLoad = function(success) {
    if (success) {
    menuItem = this.firstChild.childNodes;
    for (var i=0; i<menuItem.length; i++) {
    item = _root.attachMovie("itemClip", "itemClip" + i, i);
    item._x = 40;
    item._y = 40*i;
    //the following turns off the hand cursor on button rollover
    item.useHandCursor = true;
    //Since the dynamic txt field was placed in it's own MC holder
    //with the instance name dyntext, I had to alter the path here
    item.dyntext.itemLabel.text = menuItem[i].attributes.name;
    item.myUrl = menuItem[i].attributes.url;
    //this starts the button fade in on rollover
    item.onRollOver = function() {
    this.gotoAndPlay("fadeIn");
    this.jumper1.gotoAndPlay(2);

    }
    //this starts the fade back to original position
    item.onRollOut = function() {
    this.gotoAndPlay("fadeOut");
    }
    item.onRelease = function() {
    getURL(this.myUrl,"_blank");
    }
    }
    }
    }
    menuXml.load("myMenu.xml");
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center