# Function within a function problem

**URL:** https://forum.kirupa.com/t/function-within-a-function-problem/298646
**Category:** Uncategorized
**Created:** [October 22, 2009, 11:43am UTC](https://forum.kirupa.com/t/function-within-a-function-problem/298646 "2009-10-22T11:43:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Justifun](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@Justifun](https://forum.kirupa.com/u/Justifun)
#### Post date: [October 22, 2009, 11:43am UTC](https://forum.kirupa.com/t/function-within-a-function-problem/298646/1 "2009-10-22T11:43:59Z")

</div>

I’m having troubles getting a function to work inside of another function…

```auto
function (HideSearches) {
	search_container_mc._visible = false;
}

function SSdown() {
	HideSearches;
	gotoAndStop(2);
}

```

Then later on down in my code where i create by buttons…

```auto
searchbutton_mc.onPress = SSdown;

```

My HideSearches function wont get executed in the SSdown function. But the SSdown function works fine. What am i doing wrong?

Thanks
