# Can't grap variables

**URL:** <https://forum.kirupa.com/t/cant-grap-variables/182001>\
**Category:** flash\
**Created:** [March 14, 2006, 8:39pm UTC](https://forum.kirupa.com/t/cant-grap-variables/182001 "2006-03-14T20:39:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregmax17](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/gregmax17/32/2243_2.png) [@gregmax17](https://forum.kirupa.com/u/gregmax17)\
**Post date:** [March 14, 2006, 8:39pm UTC](https://forum.kirupa.com/t/cant-grap-variables/182001/1 "2006-03-14T20:39:54Z")

</div>

Ok, I am able to trace/send variables that are needed for my project. Though I am able to trace them in the same frame, I can’t reffer to them in another frame, it out puts ‘undefined’? But again, I am able to see the out put fine in one frame, how come not another? I tried putting it into a global too.

Here is sample of the script:

// face the direction  
ob.clip.gotoAndStop(dirx+diry\*2+3);

// calculate the tile where chars center is  
ob.xtile = Math.floor(ob.x/game.tileW);  
ob.ytile = Math.floor(ob.y/game.tileH);

I can trace(ob.xtile); and trace(ob.ytile);, but again, I can’t do it in another frame later in the scene. Any help?
