Function doesn't work? - Please Help!

Hello All,

In my main timeline, I have an image fade in and stop on frame 61. On Frame 61, the code below executes;

var placesXML:XML = 
<place name= "Bengkulu">
<Data>This is a deliightful place in Sumatra</Data>
<place name= "Yogyakarta">
<Data>This is a deliightful place in Java</Data>
<place name= "Banda_Aceh">
<Data>This is a deliightful place in Northern Sumatra</Data>

var nameBtn:Array = [Yogyakarta, Banda_Aceh, Bengkulu]; 
var i:int = nameBtn.length; 
nameBtn*.addEventListener(MouseEvent.CLICK, showData);

function showData(e:MouseEvent):void{
var xmlFrame:int = placesXML.*.(@name ==;
var xmlData:XMLList = placesXML.*.(@name ==;
myMarker_mc.myText.text = xmlData.toString();


function removeMarker(event:MouseEvent):void 

myMarker_mc.bt_remove.addEventListener(MouseEvent. CLICK, removeMarker);

function scrollUp (Event:MouseEvent):void {

myMarker_mc.myText.scrollV -= 1;

function scrollDown (Event:MouseEvent):void {

myMarker_mc.myText.scrollV += 1;

myMarker_mc.bt_up.addEventListener (MouseEvent.CLICK, scrollUp)

myMarker_mc.bt_dn.addEventListener (MouseEvent.CLICK, scrollDown)[/LEFT]

All the script below the function ‘showData’ relates to a MovieClip (named ‘myMarker_mc’) and some buttons within this movieclip.

There are no output errors, or compiler errors, yet when I click on one of the buttons, the movie does nothing - it certainly does not gotoAndStop on frame 62, 63, or 64 as I am asking it too. Before this code on Frame 61, there are no other actions at all in the movie - just a simple fade in image…Any thoughts as to what the potential problem may be?

If you paste this code into a new .fla, put 3 buttons on it, atextfield (called myText), create 4 frames and change the data in the xml node ‘<frame>’ to 2,3 or 4 (depending upon <place>, the code executes perfectly.

I have now tried tracing (the objects below), within the click handler curly braces (showData);

‘xmlData’ produces nothing in the Output
‘xmlFrame’ produces ‘0’ on each click in the Output window.

Tracing both the above OUTSIDE of the showData function curly braces produces;

1120: Access of undefined property of xmlFrame, or xmlData.

Tracing the nameBtn* produces ‘[object SimpleButton]’ in the Output Window.

Any fresh ideas?!!

Dan H