# Problem passing a variable to a button inside a movieclip

**URL:** <https://forum.kirupa.com/t/problem-passing-a-variable-to-a-button-inside-a-movieclip/130740>\
**Category:** Uncategorized\
**Created:** [December 8, 2004, 3:24am UTC](https://forum.kirupa.com/t/problem-passing-a-variable-to-a-button-inside-a-movieclip/130740 "2004-12-08T03:24:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neiro](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@neiro](https://forum.kirupa.com/u/neiro)\
**Post date:** [December 8, 2004, 3:24am UTC](https://forum.kirupa.com/t/problem-passing-a-variable-to-a-button-inside-a-movieclip/130740/1 "2004-12-08T03:24:51Z")

</div>

Hello,

I have list that is generated from a database that when click it calls a seperate movieclip in the library called comments and loads data from the database in it. I the movieclip i have buttons that I am trying to pass the data to but it doesnt seem to be working.

here is my actionscript:

getReleaseInfo\_Result = function (releasesID,track1url,track2url,track3url,track4url) {

\_root.container.attachMovie(“comments”, “comments”, 100);  
\_root.container.comments.\_x = 325;  
\_root.container.comments.\_y = 150;  
\_root.container.comments.track1.text = releasesID.getItemAt(0).track1  
var track1url = releasesID.getItemAt(0).track1url  
\_root.container.comments.track1url.text = track1url  
trace(track1url);  
};

Track1url is the variable I am trying to pass to use it in the on press fuction below.

on (press) {  
\_root.splayer.doPlay(track1url);  
trace(track1url);  
}

Can anyone steer me in the right direction.

thanks,

chad
