# Flash KeyNav through Array of Functions

**URL:** <https://forum.kirupa.com/t/flash-keynav-through-array-of-functions/313088>\
**Category:** flash\
**Created:** [August 19, 2010, 2:17pm UTC](https://forum.kirupa.com/t/flash-keynav-through-array-of-functions/313088 "2010-08-19T14:17:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darastudio](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/darastudio/32/3764_2.png) [@darastudio](https://forum.kirupa.com/u/darastudio)\
**Post date:** [August 19, 2010, 2:17pm UTC](https://forum.kirupa.com/t/flash-keynav-through-array-of-functions/313088/1 "2010-08-19T14:17:07Z")

</div>

I’m basically creating a glorified Powerpoint presentation… except a lot more “flashy”.  
If there is a better way to do this, just tell me.

I have each “slide” basically as a function of animations (done with greensock tweenlite).

I want to be able to go to the next slide (function) in the list by pressing the right arrow key.  
And back with the left key, etc…

Some things i’ve looked at but not quite got it…  
[http://www.kirupa.com/developer/as3/using\_keyboard\_as3.htm](http://www.kirupa.com/forum/../developer/as3/using_keyboard_as3.htm)

> **[Call and run a function from an array of functions?](https://www.kirupa.com/forum/showthread.php?t=328812)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

Everything i’ve tried to make keeps breaking.  
Forgive my non flash eliteness.

If you have more questions, hopefully i have answers!

The code that i do have… but like i said i need it to go to the next function (in an array i guess).

```auto
stage.addEventListener(KeyboardEvent.KEY_DOWN, keycontrol);

function keycontrol(event:KeyboardEvent):void
    {
    switch (event.keyCode)
        {
        case Keyboard.LEFT:
        {
            objectives();
        }
        case Keyboard.RIGHT:
        {
            objectives();
        }
    }
}

```
