# Callin a function

**URL:** <https://forum.kirupa.com/t/callin-a-function/163708>\
**Category:** flash\
**Created:** [September 25, 2005, 12:07pm UTC](https://forum.kirupa.com/t/callin-a-function/163708 "2005-09-25T12:07:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.kirupa.com/u/Dave)\
**Post date:** [September 25, 2005, 12:07pm UTC](https://forum.kirupa.com/t/callin-a-function/163708/1 "2005-09-25T12:07:38Z")

</div>

Hey GUys,

Been practicing actionscript etc.  
Came across this game tutorial and saw the following code:

function moveStuff() {  
if (Key.isDown(Key.LEFT)) {  
this.\_x -= 5;  
}

box\_mc.onEnterFrame = moveStuff;

For some reason i thought, when you call a function you have to end it with curly brackets. ie. moveStuff();

How come this isnt the case??

Thanks  
🙂
