# Modified squirrelfinder help! (loadmovienum)

**URL:** https://forum.kirupa.com/t/modified-squirrelfinder-help-loadmovienum/270344
**Category:** flash
**Created:** [September 9, 2008, 1:24am UTC](https://forum.kirupa.com/t/modified-squirrelfinder-help-loadmovienum/270344 "2008-09-09T01:24:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![b4wx](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@b4wx](https://forum.kirupa.com/u/b4wx)
#### Post date: [September 9, 2008, 1:24am UTC](https://forum.kirupa.com/t/modified-squirrelfinder-help-loadmovienum/270344/1 "2008-09-09T01:24:53Z")

</div>

Hi guys, i’ve been trying to play around with the squirrel finder tutorial code to make it so that once you click on the squirrel’s name, it will load a new swf file instead of displaying additional content.

the coding i’m using is working fine, the only thing that isnt working is the .onRelease  
no matter how many buttons i include in the XML file, all buttons manifested will try to load up the same swf.

this is the coding i’m working with.

```auto

//INITIALIZE
var _xml = new XML();
_xml.ignoreWhite = true;
_xml.onLoad = function(success){
if (success) {
	reelsROOT= _xml.idMap["reels"];
	_reelsTitle.text = reelsROOT.attributes.h;
	CreateMenu(this);
}
else trace("Error loading XML file");
}
_xml.load("test.xml");

//MENU
function CreateMenu(menu_xml){
	var item_spacing = 120; 
	var item_count = 0;
	
	var datacount = menu_xml.idMap["reels"].childNodes;
	var items = reelsROOT.childNodes;
	
	for (var i=0; i<datacount.length; i++) {
			var reelinfo = items*.childNodes[0].childNodes;
			
			var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
			item_mc.reelURL = items*.childNodes[1].childNodes;
			trace(item_mc.reelURL);
			
			
			item_mc._x = item_count * item_spacing;
			item_count++;
			
			item_mc.reel_txt.text = reelinfo;
			item_mc.main_btn.onRelease = function() {
					**loadMovieNum(item_mc.reelURL, 4);**
					}
						
				}
			
}

```

my xml file looks somewhat like this:

```auto

<xml>
<Sections id="reels" h="REELS">
		<data>
			<title>REEL01</title>
			<src>clips/01.swf</src>
		</data>
		<data>
			<title>REEL02</title>
			<src>clips/02.swf</src>
		</data>
		<data>
			<title>REEL03</title>
			<src>clips/03.swf</src>
		</data>

	</Sections>
</xml>

```

So using this code, the 3 buttons are created just fine. when i trace into to item\_mc.reelURL they trace perfectly, showing all 3 different swf paths. it’s just upon CLICKING the button, ALL of the buttons ONLY point to (clips/03.swf)

any suggestions, guys?

Thanks a bunch
