Being new to flash and php, I am not able to pass URL onclick .

Here is scenario and code I am working on:

I have a datagrid populated using xml connector and dataset(using mysql). The
URL is hidden in datagrid. But when user click on datagrid, selects a row and
clicks on button below datagrid, its goes to different URL.

below is my code, but its not working.

Row1: user1
when user clicks on row1, and clicks on button, it goes to row1 URL stored in

Here the code:

btnlistener = new Object();

//function when pressing on a cell in datagrids

btnlistener.onPress = function(evt){
var selection:Boolean = false

for(i=0; i< user_dg.length; i++)
selection = true

getURL("user_dg.getItemAt(i).url+", "POST");

start_btn.addEventListener("onPress", btnlistener);

Any help is appreciated.