3 Replies Latest reply on Apr 18, 2006 7:52 AM by Peter Lorent

    Access class' properties (in _root) from movieclip timeline?

    anticone
      I'm trying to follow the advice "class properties are better then _global variables", but how could I access a class' properties (imported in the main timeline) from a movie Clip timeline?

      this code in the main timeline works (and trace the value of lang):
      import scripts.StartupSettings
      trace (StartupSettings.lang);

      but if I try to access the lang property from a movie clip timeline, with the same:
      trace (StartupSettings.lang);

      I get traced "undefined".

      The only workaround I have found is to import again the class inside the clip, but I would like to avoid it in order to keep dimensions small.

      Any idea? thanks