multidimensional array

  • BardicKnowledge
  • Novice
  • Novice
  • BardicKnowledge
  • Posts: 21
  • Loc: Halifax

Post 3+ Months Ago

I have been looking at this for about 2 hours and I can't figure it out. I have searched high and low for a good tutorial but no luck.

Any help would be wonderful or even a link to a good guide.

Code: [ Select ]
function setSizes(){
    counter = 0;
    var origSize:Array = new Array();
    for (var i = 0; i<titleArray.length; i++){
        var myArray:Array = new Array();
        for (var ii=0; ii<2;ii++){
            if(ii = 0){
                origSize[i][ii] = eval(titleArray[i])._width;
            }else if(ii = 1){
                origSize[i][ii] = eval(titleArray[i])._height;
            }
        }
    }
}
  1. function setSizes(){
  2.     counter = 0;
  3.     var origSize:Array = new Array();
  4.     for (var i = 0; i<titleArray.length; i++){
  5.         var myArray:Array = new Array();
  6.         for (var ii=0; ii<2;ii++){
  7.             if(ii = 0){
  8.                 origSize[i][ii] = eval(titleArray[i])._width;
  9.             }else if(ii = 1){
  10.                 origSize[i][ii] = eval(titleArray[i])._height;
  11.             }
  12.         }
  13.     }
  14. }
  • BardicKnowledge
  • Novice
  • Novice
  • BardicKnowledge
  • Posts: 21
  • Loc: Halifax

Post 3+ Months Ago

I figured it out.

Code: [ Select ]
function setSizes(){        
    origSize = new Array();         
    for (var i = 0; i<titleArray.length; i++){
        origSize[i] = new Array();
        for (var ii=0; ii<2;ii++){
            if(ii = 1){
                origSize[i][ii] = eval(titleArray[i])._width;                
            }
            if(ii = 2){
                origSize[i][ii] = eval(titleArray[i])._height;
            }
        }
    }
}
  1. function setSizes(){        
  2.     origSize = new Array();         
  3.     for (var i = 0; i<titleArray.length; i++){
  4.         origSize[i] = new Array();
  5.         for (var ii=0; ii<2;ii++){
  6.             if(ii = 1){
  7.                 origSize[i][ii] = eval(titleArray[i])._width;                
  8.             }
  9.             if(ii = 2){
  10.                 origSize[i][ii] = eval(titleArray[i])._height;
  11.             }
  12.         }
  13.     }
  14. }

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 18 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.