0 Replies Latest reply on Jul 19, 2006 3:58 PM by mritzman

    accordion load event does not fire when accordion and load event created dynamically using actionsript

      I cannot get the accordion load event to fire when I have created the accordion and load event using actionscript . Here is some sample code:

      createClassObject(mx.containers.Accordion, "acc", getNextHighestDepth());
      acc.createSegment(mx.containers.ScrollPane, "sc1", "Number One");
      acc.createSegment(mx.containers.ScrollPane, "sc2", "Number Two");
      var accLis=new Object();
      accLis.load=function(evtObj) {
      accLis.change=function(evtObj) {
      acc.addEventListener("load", accLis);
      acc.addEventListener("change", accLis);

      I made sure to add the ScrollPane and Accordion components to my library. So the load event does not fire, but the change event does fire. And through further testing the other events do not fire, including the draw event. Can anyone help? The only time I can get the load event to fire on an accordion is if I put an accordion on stage, select it and add the actionscript to the objects actions like shown below:

      on(load) {
      on(draw) {

      Can somebody help? Unfortunately I must create all my components dynamically. Thank you in advance.