3 Replies Latest reply on Oct 17, 2007 11:38 AM by kglad

    AS3: root to child SWF communication

      I am making the transition to AS3 and have been finding it quite difficult. If my root file loads in a child SWF, and I want to call a function inside that child SWF, how would i do it? The code on my root file is like....

      var loader:Loader = new Loader();
      var path:String = "square.swf";
      var squareRequest:URLRequest = new URLRequest(path);
      container.addChild(loader); // container is a movieclip
      container.someFunction(); // does not work!

      On a different note, what the hell is up with calling a root function from a nested movieclip? Instead of root.someFunction(); it is MovieClip(root).someFunction();
      Flash should know that root is a MovieClip and not just a DisplayObject.