multiple js objects sharing information

    May 25 2013 | 2:57 pm
    Read  the Max tutorials about java and the global object, but cannot find out, how  js objects share Infomations. Woulf like to create an array in one js object and share it with another js object.
    Thanks for any help!

    • May 25 2013 | 3:18 pm
      The Global object should allow you to do this, otherwise the new Dict object should work too.
    • May 25 2013 | 4:06 pm
      Found the solution for me:
      first js pbject:
      glob = new Global("bounce");
      glob.a_array = new Array;
      creating array b_array in second js object, then:
      glob = new Global("bounce");
    • May 18 2015 | 10:28 pm
      I've a probleme with the Global Object.
      I do not have any probleme with the last message in that thread, I mean , I'm able to create a Global array and access it from an another instance of JS.
      My probleme is that I've created a data structure that contain array, variable type etc... but that was before figure out that it could be useful for me to make it Global.
      So, as I understand it for the moment (maybe I'm wrong) I will need to change all my code for make it Global ? ok lets say I've this :
      var ridge = function () {
      this.area = null;
      this.delt = [];
      this.ecar = null;
      this.len = null;
      this.max = null;
      this.signe = null;
      this.vari = null;
      var delta = function () {
      this.signe = null;
      this.pos = null;
      this.len = null;
      var all_ridge = [];
      function bang()
      for (i ; i < 10; i ++) {
      all_ridge[i] = new ridge();
      for(j; j < 10 ; j++) {
      all_ridge[i].delt[j] = new delta();
      How Can I make that all_ridge data structure Global ? I will need to change all my code using 'glob.all_ridge[i]' ?