0 Replies Latest reply on Aug 6, 2008 2:25 AM by Demonic_Cat

    Parent swf call function in Child swf not working

    Demonic_Cat
      Hi all,

      I'm having a problem with this and I just can't figure it out :( (I've been trying different things and staring at it for hours and I'm losing my mind...)

      So I have a Parent swf that loads a Child swf (this goes without any problems), but I want the Parent to call a function in the child, now this is where it goes wrong...

      The function the Parent has to call is named "lookupcar" and needs to give the value "wagen" with it. The problem I think is that the Parent wants to call the function but it still needs to load (correct me if I'm wrong). Is there a way to check if the Child swf is loaded completely before trying to call the function? Could you give me an example of this please? Or any other suggestions on what goes wrong?

      Code in the Parent
      .......
      root.inhoud.createEmptyMovieClip("thetext", "thetext", this.getNextHighestDepth());
      root.inhoud.thetext.loadMovie("uitrusting-wagenpark.swf");
      root.inhoud.thetext.lookupcar(wagen);

      Code in the Child
      (the function lookupcar)
      _global.lookupcar = function(carnr:String){
      trace("LOOKUPCAR, with car nr: " + carnr);
      ......
      }

      Thanks in advance for all the help.