# Button inside a frame not working

**URL:** <https://forum.kirupa.com/t/button-inside-a-frame-not-working/167301>\
**Category:** flash\
**Created:** [October 27, 2005, 12:37am UTC](https://forum.kirupa.com/t/button-inside-a-frame-not-working/167301 "2005-10-27T00:37:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superprg](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@superprg](https://forum.kirupa.com/u/superprg)\
**Post date:** [October 27, 2005, 12:37am UTC](https://forum.kirupa.com/t/button-inside-a-frame-not-working/167301/1 "2005-10-27T00:37:07Z")

</div>

I have this situation

How can I write the button.press even for OK button?

Instance name of the popup window=addprod1  
Instance name of Ok=pop\_addprod\_ok

I tried this in the action part of OK

on(release)  
{  
trace(input\_pname.text);  
var anObject= {id:6, available:true, item:input\_pname.text, quantity: 3, price: input\_pvalue.text};  
\_root.grid.addItem(anObject);  
[//grid.addItem](https://grid.addItem)(anObject);…even this doesnt works!  
this.\_visible=0;  
}

trace works but no data is being added to the Grid

When in my actionscript layer I write  
pop\_addprod\_ok.press=function()  
{  
trace(“Here”);  
}

It is not at all called  
Can anyone please explain what is going wrong?  
Thanks
