1 Reply Latest reply on Mar 10, 2007 1:03 AM by Bencwai

    How to create a  Loader dynamically during runtime???

      I would like to create a image Loader when I passed a button.If the number of generated Loader more than 3 then the button will be inactive.

      I have tried to write the following statemnet:

      but_addLogo.onPress = function (){
      var logo:String= "logo"+i;

      if (i>3){
      but_addLogo.enabled= false;

      _root.createClassObject(mx.controls.Loader, logo, 10);

      logo.contentPath = cb_logoID.selectedItem.data;

      However, it dosent work....T_T .I know the problem is the name of the generated Loader but I dont know how to solve it..

      Also, I dont know how to apply an array to Loader...

      Thanks so much