Variables coming back undefined? any ideas for a solution?

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:


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:-

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