4 Replies Latest reply on Sep 7, 2009 8:57 PM by prajeeshmp86

    createClassObject returning null value when creating dynamic components.

    prajeeshmp86

      createClassObject returning null value when creating dynamic components.

       

      I am using the following code

       

      var __reg2 = new Object();
              __reg2.label = _label;
              __reg2._width = _w;
              __reg2._height = _h;
              __reg2._x = this.width / 2 - _w / 2;
              __reg2._y = this.height / 2 - _h / 2;
              __reg2._alpha = 0;

      this.launch_button = this.mc.createClassObject(controls.PixtorieButton, "launch_button", this.mc.getNextHighestDepth(), __reg2);

       

      this.mc is a movieclip which has the correct value during runtime but when i use createClassObject()  with it its always returning null value.

       

      I have the component dragged into my library.

       

      Also the code fails even when i am using  mx.controls.Button instead of  controls.PixtorieButton .

       

      Any help will be greatly appreciated

       

      Thanks in advance