0 Replies Latest reply on Jul 20, 2006 8:42 AM by mike2281

    RSL Dynamic Link

    mike2281
      I created 3 projects

      Library project: global.swc
      Library Project: control.swc
      Application: main.swf

      Control references global via RSL Dynamic
      Application references global via RSL Dynamic
      Application references control via RSL Dynamic


      global.swc
      [Bindable]
      public class Global
      {
      public var SharedValue:String = "start value";

      public static function get Instance():Global
      {
      if (!Global._instance) Global._instance = new Global();
      return Global._instance;
      }
      private static var _instance:Global;

      }

      control.swc contains a container control with a TextInput bound to Global.Instance.SharedValue and it’s change event updates SharedValue.

      Main.swf contains the custom control and another TextInput bound to Global.Instance.SharedValue and it’s change event updates SharedValue.

      When either of the two TextInput controls change the other is updated with the shared value. This appears to be a great way to share data and also allow more advanced communication between a group of apps running in a larger app, by RSL Dynamic Linking the main app and all child apps to a global.swc that exist for the sole purpose of allowing the apps to talk.

      When linking is RSL Dynamic I get a message asking where to locate the debugger I just hit cancel and it works. Why do I get this message?

      When linking is External the app will not run, I get type not found errors, but it does compile?

      When linking is Merge into code, The app works and values are correctly shared, I have read all the docs about library sharing and done some experimenting but I do not understand why External fails, RSL Dynamic seems like the best solution?? But I get the debugger error whatnting either localhost or an IP???

      Is this a good way to share data and allow apps to communicate?

      Thanks,

      Mike