1 Reply Latest reply on May 9, 2008 10:34 AM by Ned Murphy

    Pass variable from child swf to parent swf

      I have created a parent moive (main.swf) and a child moive (pic.swf)

      In main.swf, there is a empty moive clip called 'mc_pic'.
      And I use '_root.mc_pic.loadMovie(pic.swf);' to load the external swf into the parent movie

      Inside the external swf, I would like to create a button so that a 'value' could be passed back to the parent movie for further process.

      how can I do it? Thank you for you help.

      Lam HO
        • 1. Pass variable from child swf to parent swf
          Ned Murphy Adobe Community Professional & MVP
          have you tried: _root.variable = childVariable; ?

          If you have some function in the _root ready to process that value, then instead you can try:


          The only real code intended here is "_root."... the rest is just descriptive words.

          Alternatively, you should be able to replace "_root" with "_parent" (in case the main.swf is a child itself)