# Buttons not responding? - NEW

**URL:** <https://forum.kirupa.com/t/buttons-not-responding-new/281559>\
**Category:** flash\
**Created:** [February 10, 2009, 5:39pm UTC](https://forum.kirupa.com/t/buttons-not-responding-new/281559 "2009-02-10T17:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DH1234](https://avatars.discourse-cdn.com/v4/letter/d/35a633/32.png) [@DH1234](https://forum.kirupa.com/u/DH1234)\
**Post date:** [February 10, 2009, 5:39pm UTC](https://forum.kirupa.com/t/buttons-not-responding-new/281559/1 "2009-02-10T17:39:08Z")

</div>

Hello All,

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

```auto
stop();
var placesXML:XML = 
<places>
    <place name= "Bengkulu">
        <frame>63</frame>
        <Data>This is a deliightful place in Sumatra</Data>
    </place>
    <place name= "Yogyakarta">
        <frame>62</frame>
        <Data>This is a deliightful place in Java</Data>
    </place>
    <place name= "Banda_Aceh">
        <frame>64</frame>
        <Data>This is a deliightful place in Northern Sumatra</Data>
    </place>
</places>

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

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

function removeMarker(event:MouseEvent):void 
{
    gotoAndStop(61);
}

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)

```

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, 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?

NEW EDIT:  
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?!!  
Cheers

Dan H
