# Function in function?

**URL:** <https://forum.kirupa.com/t/function-in-function/182115>\
**Category:** flash\
**Created:** [March 15, 2006, 4:24pm UTC](https://forum.kirupa.com/t/function-in-function/182115 "2006-03-15T16:24:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeraph](https://avatars.discourse-cdn.com/v4/letter/x/e495f1/32.png) [@Xeraph](https://forum.kirupa.com/u/Xeraph)\
**Post date:** [March 15, 2006, 4:24pm UTC](https://forum.kirupa.com/t/function-in-function/182115/1 "2006-03-15T16:24:57Z")

</div>

I’m trying to make a function:

```auto

function test (mc:String, pixel:Number){
with (mc){
onEnterFrame = function(){
 _x += pixel;
}
}

```

Problem:  
The variables won’t be recognized anymore after the second function.

How can I get this code working?
