# MMExecute: Pass a var to function

**URL:** <https://forum.kirupa.com/t/mmexecute-pass-a-var-to-function/329527>\
**Category:** flash\
**Created:** [September 10, 2012, 2:54pm UTC](https://forum.kirupa.com/t/mmexecute-pass-a-var-to-function/329527 "2012-09-10T14:54:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adsn](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@adsn](https://forum.kirupa.com/u/adsn)\
**Post date:** [September 10, 2012, 2:54pm UTC](https://forum.kirupa.com/t/mmexecute-pass-a-var-to-function/329527/1 "2012-09-10T14:54:41Z")

</div>

hello,

I’m a as3/ jsfl beginner and I’m trying to make a custom swf panel in flash (CS4, AS3) to call

my scripts located in the Commands folder.  
Running the script or a single function from the swf is not a problem, but how can i pass a variable  
to the function?

I tried several variants of the code below, but there is always an error:

```auto
MMExecute("fl.runScript(fl.configURI + 'Commands/script.jsfl', 'functionname', var_to_pass);");

```

Thanks for your time.

adsn

edit:  
Never mind, as always, right after posting I solved the issue.
