# Problem with function

**URL:** <https://forum.kirupa.com/t/problem-with-function/183178>\
**Category:** Uncategorized\
**Created:** [March 24, 2006, 11:56am UTC](https://forum.kirupa.com/t/problem-with-function/183178 "2006-03-24T11:56:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vedran](https://avatars.discourse-cdn.com/v4/letter/v/bb73d2/32.png) [@vedran](https://forum.kirupa.com/u/vedran)\
**Post date:** [March 24, 2006, 11:56am UTC](https://forum.kirupa.com/t/problem-with-function/183178/1 "2006-03-24T11:56:17Z")

</div>

please help, how can i make this work?  
you press on the tipka\_mc and you declare clip variable with new value, then use it with onRelease, what’s wrong???

tipka\_mc.onPress = function(){  
trace(“press”);  
clip = tipka\_mc;  
}

clip.onRelease = function(){  
trace(“release”);  
}

muchos gracias!

---

<div class="post-metadata">

**Author:** ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)\
**Post date:** [March 24, 2006, 3:15pm UTC](https://forum.kirupa.com/t/problem-with-function/183178/2 "2006-03-24T15:15:03Z")

</div>

```auto
tipka_mc.onPress = function() {
 trace("press");
 this.onRelease = function() {
  trace("release");
 };
};

```
