2 Replies Latest reply on Jan 2, 2008 1:46 PM by somascope

    Pass variable from one SWF to another SWF

    somascope Level 3
      I am having difficulties passing a variable from one SWF to a dynamically loaded SWF.

      I can get variables to pass into a SWF while using FlashVars in HTML. But in this case, I need to load the SWF file into another SWF file instead of directly via an HTML page & FLashVars. So now I can't figure out how to pass a variable from my main SWF file another SWF file.

      // testA.fla AS code:
      myText_txt.text = testVar; // this would display whatever I pass it when using FlashVars to set testVar in HTML

      // testB.fla AS code:
      this.createEmptyMovieClip("holder_mc", 0);
      holder_mc.testVar = "Does this show up?"; // it doesn't show up
      holder_mc.loadMovie("testA.swf");
      //holder_mc.loadMovie("testA.swf?testVar='some thing i want to pass'");// doesn't work.

      Any insight is appreciated!