A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: 'eval' problem, please help

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    49

    Red face

    hi,
    i want to create new Objects dynamically, depending on an Array....

    basically i wrote this function :

    function theObject(name){
    this._name=name;
    }

  2. #2
    Member
    Join Date
    Jan 2001
    Posts
    49

    uups

    hi,
    i want to create new Objects dynamically, depending on an Array....

    basically i wrote this function :

    function theObject(name){
    this._name=name;
    }

    theArray=new Array("one", "two" .... "n");

    for(i=0; i<theArray.length; i++){
    theNewName="theItem" add i;
    eval(theNewName) = new theObject(theArray[i]);
    }

    that only creates undefined variables named 'Item0, Item1, ..... itemN'......

    please Help

    THNX


  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    49

    please help

    THNX

  4. #4
    Member
    Join Date
    Jan 2001
    Posts
    49
    does noone know?????????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center