# Calling a function

**URL:** <https://forum.kirupa.com/t/calling-a-function/51501>\
**Category:** flash\
**Created:** [May 13, 2004, 2:29pm UTC](https://forum.kirupa.com/t/calling-a-function/51501 "2004-05-13T14:29:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmerens](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bmerens](https://forum.kirupa.com/u/bmerens)\
**Post date:** [May 13, 2004, 2:29pm UTC](https://forum.kirupa.com/t/calling-a-function/51501/1 "2004-05-13T14:29:05Z")

</div>

hello

here is my prob :

on frame 1 : I define a function  
exemple : function exemple(){  
a=1;  
}//end function

on frame 2 : line0 :exemple()  
line1 : trace(a);

=\> but there is no trace of a. the function has not been called

but if I add a button with on release exemple(), the function exemple has been called

is this normal ? how can I call and execute a function without calling it trough a button.

thanks for your help !
