XML Basic Tut. only dynamic text boxes no images

Creating 3 dynamic text fields (caption, caption1 and caption2) on stage loading from XML. First set of data loads fine into respectable fields from XML, however buttons are not changing data on click. Working in Flash 8 using standard XML format. Any ideas yall? Thanks in advance.
MT

I have traced succesfully. All fields are on main frame (simple test page), but I am still not getting a response from my handlers on prev and next buttons.
code:


var x:XML = new XML(); 
x.ignoreWhite = true; 
var e:Array = new Array(); 
var e1:Array = new Array(); 
var e2:Array = new Array(); 
var whatOn:Number;

x.onLoad = function() { 
 var p:Array = this.firstChild.childNodes; 
 for(i=0;i<p.length;i++) { 
  e.push(p*.attributes.english); 
  e1.push(p*.attributes.english1); 
  e2.push(p*.attributes.english2); 
 } 
 caption.text = e[0]; 
 caption1.text = e1[0]; 
 caption2.text = e2[0]; 
 whatOn = 0; 
} 

x.load("text.xml"); 

p.onRelease = function() { 
 if(whatOn > 0) { 
  whatOn--; 
  caption.text = e[whatOn]; 
  caption1.text = e1[whatOn]; 
  caption2.text = e2[whatOn]; 
 } 
} 

n.onRelease = function() { 
 if(whatOn < p.length-1) { 
  whatOn++; 
  caption.text = e[whatOn]; 
  caption1.text = e1[whatOn]; 
  caption2.text = e2[whatOn]; 
 } 
} 


<?xml version......?> 
<phrase> 
<text english="hello" english1="what up" english2="yo" /> 
<text english="hey there" english1="whats good" english2="howdy" /> 
</phrase> 

Okay i have tried _global param to my (whatOn) var and it is still not rendering the next dataset. Ahhhhhhhhhhhhhhhhhhhhhh hmmmmmmmmmm. okay anyone please take a gander if you will. Not sure why this is causing conflict and not producing, so any insight is appreciated. Thanks in advance.
MT

[QUOTE=Multi-Task;1984404]Okay i have tried _global param to my (whatOn) var and it is still not rendering the next dataset. Ahhhhhhhhhhhhhhhhhhhhhh hmmmmmmmmmm. okay anyone please take a gander if you will. Not sure why this is causing conflict and not producing, so any insight is appreciated. Thanks in advance.
MT[/QUOTE]

The problem is accessing your array p
try

 var p:Array 
x.onLoad = function() {
	p= this.firstChild.childNodes;
	for (i=0; i<p.length; i++) {
		e.push(p*.attributes.english);
		e1.push(p*.attributes.english1);
		e2.push(p*.attributes.english2);
	}
	caption.text = e[0];
	caption1.text = e1[0];
	caption2.text = e2[0];
	whatOn = 0;
};
x.load("test.xml");
//you need to change the instance name of the btn
pp.onRelease = function() {...........

Whos is in the motha F’ing HOUUUUUUUUUUUUUUUUSE. Dats right stringy in theeeeeeeeeeeee house!

Ok ive settled down now…lay it down for me buddy.
Why when I am accessing it from var p:Array = this.firstChild.childNodes; it hates? Shouldnt that set the first set?
Stringy please drop knowledge or could you suggest some reading from your personal stash of brain enhancements? Ciao from across the pond. MT.

[QUOTE=Multi-Task;1984760]Whos is in the motha F’ing HOUUUUUUUUUUUUUUUUSE. Dats right stringy in theeeeeeeeeeeee house!

Ok ive settled down now…lay it down for me buddy.
Why when I am accessing it from var p:Array = this.firstChild.childNodes; it hates? Shouldnt that set the first set?
Stringy please drop knowledge or could you suggest some reading from your personal stash of brain enhancements? Ciao from across the pond. MT.[/QUOTE]
Blimey,what language is that ? :stuck_out_tongue:
Using “var” inside a function means that the variable is only available within that function.

Claro. Claro. So after I close the function and create the button functions it cant access it. Tiiiiiiiiiiiiiiiiiiiiiight. Thanks much appreciated.

[QUOTE=Multi-Task;1985028]Claro. Claro. So after I close the function and create the button functions it cant access it. Tiiiiiiiiiiiiiiiiiiiiiight. Thanks much appreciated.[/QUOTE]

No problem