# Accessing Loop Variables Outwith Loop

**URL:** <https://forum.kirupa.com/t/accessing-loop-variables-outwith-loop/321968>\
**Category:** flash\
**Created:** [May 5, 2011, 6:59pm UTC](https://forum.kirupa.com/t/accessing-loop-variables-outwith-loop/321968 "2011-05-05T18:59:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CCG1993](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@CCG1993](https://forum.kirupa.com/u/CCG1993)\
**Post date:** [May 5, 2011, 6:59pm UTC](https://forum.kirupa.com/t/accessing-loop-variables-outwith-loop/321968/1 "2011-05-05T18:59:39Z")

</div>

Say, I had a loop in a function…

```auto

function startLoop(event:Event):void{
    for (var a = 0; a < 5; a++){
 
    }
}

```

…How would I refer to **a** in another function

Thanks,

CCG199
