1 Reply Latest reply on May 10, 2010 8:57 AM by kglad

    using the ADDED eventListener.

    home_aidan Level 1
      Hi,
      Im trying to use the added eventlistener. When a child is loaded i then wish to trigger to a function. But the function seems to be triggering before the graphic is load.
      I am using this for some press loader functionality before a database is queried.
      My code looks like this....
      loadingicon = new loadIcon();
      gridCradle.addEventListener(Event.ADDED, loadiconAdded);
      gridCradle.addChild(loadingicon);
      public function loadiconAdded(e:Event) {
      if (e.target == loadingicon) {
      troot.debugger.htmlText+="icon loaded"
      gridCradle.removeEventListener(Event.ADDED, loadiconAdded);
      inizRequestOfData();
      }
      }
      The above if statment works. But inizRequestOfData() seems to be trigged before the loading of anygraphic is done.
      Could any one help?