# \[any\] Newbie question, calling functions from vars

**URL:** <https://forum.kirupa.com/t/any-newbie-question-calling-functions-from-vars/178074>\
**Category:** flash\
**Created:** [February 7, 2006, 3:41pm UTC](https://forum.kirupa.com/t/any-newbie-question-calling-functions-from-vars/178074 "2006-02-07T15:41:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loque](https://avatars.discourse-cdn.com/v4/letter/l/dfb087/32.png) [@Loque](https://forum.kirupa.com/u/Loque)\
**Post date:** [February 7, 2006, 3:41pm UTC](https://forum.kirupa.com/t/any-newbie-question-calling-functions-from-vars/178074/1 "2006-02-07T15:41:34Z")

</div>

Hey all,

Just wondering how/if it is possible to do this in anyway;

```php

function finale(){
    finalFunc = "section" + _root.selectedSection
    finalFunc();
}
_root.selectedSection = 1
finale();

function section1(){trace("moo")}
function section2(){}

```

I know what i am doing is wrong, just not sure how i would go about doing it. Im such an amateur 😑

Many thanks!  
L
