# Call function with argument

**URL:** <https://forum.kirupa.com/t/call-function-with-argument/321319>\
**Category:** flash\
**Created:** [April 16, 2011, 11:12am UTC](https://forum.kirupa.com/t/call-function-with-argument/321319 "2011-04-16T11:12:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![12abhi12](https://avatars.discourse-cdn.com/v4/letter/1/9f8e36/32.png) [@12abhi12](https://forum.kirupa.com/u/12abhi12)\
**Post date:** [April 16, 2011, 11:12am UTC](https://forum.kirupa.com/t/call-function-with-argument/321319/1 "2011-04-16T11:12:28Z")

</div>

In the code I want to call the function like this _\_root.onMouseUp=do(“xyz”)_, but the way is not correct. Can anybody tell me the correct way to do this.

```auto

function do(abc) {
	trace(abc)
}
_root.onMouseUp=function(){
	do("xyz")
}

```
