Skip to main content
Known Participant
May 17, 2008
Question

Navigating to top-level timeline

  • May 17, 2008
  • 4 replies
  • 421 views
Hi all -- I was hoping I could define a global variable in my timeline, and have code I write in various packages find it. For example, I might define 'cwVerbose = true;' in Actions for frame 1 of my top-most timeline, while classes I define in external text files might check that value and trace a bunch of stuff if true. But I can't figure out a way for code to find the variable. I'm using a document class. If I'm in the context of a displayObject class I could navigate up through the display list to find the top-level SWF object; but if I'm not I seem to be out of luck.

I played around with the ApplicationDomain class for a few hours tonight but I haven't been able to find anything in it :-(

Any ideas? Maybe I should be using a completely different approach?

Thanks!
Bob
This topic has been closed for replies.

4 replies

Ned Murphy
Legend
May 19, 2008
You're welcome. Yeah, sometimes life goes that way.
Ned Murphy
Legend
May 19, 2008
You're welcome. Yeah, sometimes life goes that way.
noltyAuthor
Known Participant
May 19, 2008
Thanks -- it wasn't what I was looking for but it's what I need!

Bob
Ned Murphy
Legend
May 17, 2008
Just Google "AS3 _global" and you can probably find a few options. Here's one result:

http://www.websitemediaplayers.com/blog/global-variables-as3/