# Headache with classes... (Can they access any timeline variables?)

**URL:** <https://forum.kirupa.com/t/headache-with-classes-can-they-access-any-timeline-variables/264518>\
**Category:** flash\
**Created:** [June 26, 2008, 7:56pm UTC](https://forum.kirupa.com/t/headache-with-classes-can-they-access-any-timeline-variables/264518 "2008-06-26T19:56:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DesignerMichael](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@DesignerMichael](https://forum.kirupa.com/u/DesignerMichael)\
**Post date:** [June 26, 2008, 7:56pm UTC](https://forum.kirupa.com/t/headache-with-classes-can-they-access-any-timeline-variables/264518/1 "2008-06-26T19:56:06Z")

</div>

Heres my problem. In my main movie all of my code is on the first frame of the main timeline.

Now, I need to do a hittest on myLevelBitmap.bitmapData on the main timeline from my class. Is that possible? I have tried alot of stuff. Tried to add the bitmapData to the child class when I create it… Tried to access my hittTesting fuctions from my class. 😕

Do I need to use some kinda hacked up method to create a global variable? I almost miss \_root…

---

<div class="post-metadata">

**Author:** ![DesignerMichael](https://avatars.discourse-cdn.com/v4/letter/d/898d66/32.png) [@DesignerMichael](https://forum.kirupa.com/u/DesignerMichael)\
**Post date:** [June 26, 2008, 8:35pm UTC](https://forum.kirupa.com/t/headache-with-classes-can-they-access-any-timeline-variables/264518/2 "2008-06-26T20:35:02Z")

</div>

Omg, yay… I got globals to work with the help of this awesome class:

[http://www.uza.lt/codex/as3-global-object/](http://www.uza.lt/codex/as3-global-object/)

I can now access hitTesting functions from within my children!
