# Variables coming back undefined? any ideas for a solution?

**URL:** <https://forum.kirupa.com/t/variables-coming-back-undefined-any-ideas-for-a-solution/176357>\
**Category:** Uncategorized\
**Created:** [January 23, 2006, 12:27pm UTC](https://forum.kirupa.com/t/variables-coming-back-undefined-any-ideas-for-a-solution/176357 "2006-01-23T12:27:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [January 23, 2006, 12:27pm UTC](https://forum.kirupa.com/t/variables-coming-back-undefined-any-ideas-for-a-solution/176357/1 "2006-01-23T12:27:16Z")

</div>

Hi all.

I am having a problem with variables in flash.

On the first keyframe I have a variable as part of my xml object. Which is all fine. and example would be:

```auto

var whichClient:Number;

```

This is basically my index for keeping track of my xml node or position.

However I would like to use this value in a different area of my movie, the advantage of this is that I can use the loadMovie and of course call whichClient + swf etention, this way I can perform other tasks,

but the variable is coming back undefined.

I have tried also just creating a variable:-

```auto
var message="hello world"

```

on the main time timeline, and called this from within a mc, and i had the same problem, it came back undefined.???

please help

Trev
