3 Replies Latest reply on Apr 4, 2007 6:50 AM by Hobbis CoolBytes

    Catching an error on global init

    sean_hess
      Hi.

      I've played around for a LONG while getting flash and flex to play nice, and have continually run up against this error.

      ReferenceError: Error #1074: Illegal write to read-only property MyCustomClassInMyLoadedSwf on global.
      at global$init()

      It comes because I am loading a swf with a Document Class into another swf. MyCustomClassInMyLoadedSwf is just some class I instantiate or use in my loaded swf's document class.

      Can I catch / ignore this error somehow? It is in global init, so putting a try block around the instantiation of the class doesn't do any good. Is there any way to ignore this for the final version?

      I'd also be open to knowing how to load swfs with Document Classes that have REAL classes as children without getting this error.

      Thanks!
      ~sean