1 Reply Latest reply on Feb 15, 2010 2:01 PM by secondshotjs

    Watching for a variable in an external swf

    secondshotjs

      Hi,

      I'm trying to load an swf game, and then repeatedly run a check to see if the game has ended by accessing one of it's variables.  Reading the forums and searching the web has gotten me this far:

       

      var myLoader:MovieClipLoader = new MovieClipLoader();
      myLoader.addListener(this);
      myLoader.loadClip("game.swf", 2);

      function onLoadInit(mc:MovieClip)
      {     

           trace('testing");
      }

       


      _root.onEnterFrame = function() {
         
         
          trace(_level2.LOCAL);
         
      }

      ******

      "testing" appears on the output window so I know it's being loaded correctly, the game is also playing correctly.  When I run the game in debug mode, it shows that the variable _level2.LOCAL exists and has a value, but the main loop just keeps kicking out "undefined."

       

      I appreciate any help.