# XML dynamic scroll dimensions

**URL:** https://forum.kirupa.com/t/xml-dynamic-scroll-dimensions/226623
**Category:** flash
**Created:** [May 22, 2007, 7:17pm UTC](https://forum.kirupa.com/t/xml-dynamic-scroll-dimensions/226623 "2007-05-22T19:17:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![platinum2151](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/platinum2151/32/2857_2.png) [@platinum2151](https://forum.kirupa.com/u/platinum2151)
#### Post date: [May 22, 2007, 7:17pm UTC](https://forum.kirupa.com/t/xml-dynamic-scroll-dimensions/226623/1 "2007-05-22T19:17:39Z")

</div>

I have a working scroll menu of XML vids, thumbs and text. But as i try to set variables to set the scroll the parameters, I can’t get it to work. Any help would be appreciated.

itemSpacing = 36;

var xml:XML = new XML();  
xml.ignoreWhite = true;  
xml.onLoad = function() {

var nodes = this.firstChild.childNodes;  
numOfItem = nodes.length;  
for(var i=0; i\<numOfItem; i++) {  
var menu = stroke.clipSummary.duplicateMovieClip(“clipSummary”+i, i+1);  
menu.\_y = i \* itemSpacing;  
menu.clipText.text = nodes\*.attributes.description;  
menu.clipIcon.loadMovie(nodes\*.attributes.image);  
menu.clipVar = nodes\*.attributes.clip;  
menu.onRollOver = over;  
menu.onRollOut = out;  
menu.onRelease = released;  
}  
}

xml.load(“movies.xml”);

player.load(“clip1.flv”);

stroke.onRollOver = panelOver;

function panelOver() {  
this.onEnterFrame = scrollPanel;  
delete this.onRollOver;  
}

var b = stroke.getBounds(\_root);

\*\*var begin = menu.firstChild.\_y;

var end = menu.lastChild.\_y;\*\*

function scrollPanel() {  
if(\_xmouse\<b.xMin || \_xmouse\>b.xMax || \_ymouse\<b.yMin || \_ymouse\>b.yMax) {  
this.onRollOver = panelOver;  
delete this.onEnterFrame;  
}

\*\* if(stroke.\_y = begin) {  
stroke.\_y = begin;  
}

```
else if(stroke._y = end) {
stroke._y = end;
}**

var xdist = _ymouse - 92;

stroke._y += -xdist / 7;

```

}

function over() {  
easeType = mx.transitions.easing.Regular.easeOut;  
alphaTween = new mx.transitions.Tween(this.bg, “\_alpha”, easeType, 0, 60, .25, true);  
}

function out() {  
easeType = mx.transitions.easing.Regular.easeOut;  
alphaTween = new mx.transitions.Tween(this.bg, “\_alpha”, easeType, 60, 100, .25, true);  
}

function released() {  
player.load(this.clipVar);  
player.play(this.clipVar);  
}
