dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: array looping & getAttributes & syntax

  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    221
    Well i,m trying to get Data in a var string out of an xml by looping through a array ; see example
    It works if I type in bv.
    string = symbolAtrributes.x_pos;

    but
    string = symbolAtrributes.eval(itemAttributesArray[h]);
    or
    string = symbolAtrributes.itemAttributesArray[h];

    doesn't work??


    example;

    var itemAttributesArray = new Array('type','id','date','x_pos','y_pos')


    for(h=0; h < itemAttributesArray.length;h++){
    string = symbolAtrributes.eval(itemAttributesArray[h]);
    }


  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    221
    well got the answer at the flash 5.0 Actionscript board- THNX -- here is the correct syntax for all you thread readers --


    var itemAttributesArray = new Array('ss','ss',)

    for(h=0;h<itemAttributesArray.length;h++){
    string = symbolAtrributes[itemAttributesArray[h]];
    }

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