1 Reply Latest reply on Nov 10, 2009 6:41 AM by pauland

    View my code

    MrFork Level 1

      Guys / girls I need some help. Please view the code below, I have been going over this now for the past 24 hours and I cannot come up with a reason as to why this isnt working.

       

      For some reason my second for loop is only interating once, view the output below to highlight this problem. Flex seems to 'skip' the second loop - PLEASE HELP.

       

      Is there a bug in flex??

       

      for (var i:int; i<CompletePageViewsData.length; i++)
                  {   
                      trace ("Index" + i);
                      trace ("Array Length" + CompletePageViewsData.length);
                             
                      for (var b:int; b<completeRedemptionDataMerchant.length; b++)
                      {       
                          trace ("Index 2:" + b);
                          if (CompletePageViewsData[i].pagepath == completeRedemptionDataMerchant[b].link)
                          {   
                              tmpMerchant = completeRedemptionDataMerchant[b].merchant;
                          }
                      }

                      tmpArray2.addItem({merchant:tmpMerchant,date:CompletePageViewsData[i].date, pagepath:CompletePageViewsData[i].pagepath, pageviews:CompletePageViewsData[i].pageviews});
                  }   
                  test1.dataProvider =tmpArray2;

       

      OUTPUT

       

      Index0
      Array Length14
      Index 2:0
      Index 2:1
      Index 2:2
      Index 2:3
      Index 2:4
      Index 2:5
      Index 2:6
      Index 2:7
      Index 2:8
      Index 2:9
      Index 2:10
      Index 2:11
      Index 2:12
      Index 2:13
      Index 2:14
      Index 2:15
      Index 2:16
      Index 2:17
      Index 2:18
      Index 2:19
      Index 2:20
      Index 2:21
      Index 2:22
      Index 2:23
      Index 2:24
      Index 2:25
      Index 2:26
      Index 2:27
      Index 2:28
      Index 2:29
      Index 2:30
      Index 2:31
      Index 2:32
      Index 2:33
      Index 2:34
      Index 2:35
      Index 2:36
      Index 2:37
      Index 2:38
      Index 2:39
      Index 2:40
      Index 2:41
      Index 2:42
      Index 2:43
      Index 2:44
      Index 2:45
      Index 2:46
      Index 2:47
      Index 2:48
      Index 2:49
      Index 2:50
      Index 2:51
      Index 2:52
      Index 2:53
      Index 2:54
      Index 2:55
      Index 2:56
      Index 2:57
      Index 2:58
      Index 2:59
      Index 2:60
      Index 2:61
      Index 2:62
      Index 2:63
      Index 2:64
      Index 2:65
      Index 2:66
      Index 2:67
      Index 2:68
      Index 2:69
      Index 2:70
      Index 2:71
      Index 2:72
      Index 2:73
      Index 2:74
      Index 2:75
      Index 2:76
      Index 2:77
      Index 2:78
      Index 2:79
      Index 2:80
      Index 2:81
      Index 2:82
      Index 2:83
      Index 2:84
      Index 2:85
      Index 2:86
      Index 2:87
      Index 2:88
      Index 2:89
      Index 2:90
      Index 2:91
      Index 2:92
      Index 2:93
      Index 2:94
      Index 2:95
      Index 2:96
      Index 2:97
      Index 2:98
      Index 2:99
      Index 2:100
      Index 2:101
      Index 2:102
      Index 2:103
      Index 2:104
      Index 2:105
      Index 2:106
      Index 2:107
      Index 2:108
      Index 2:109
      Index 2:110
      Index 2:111
      Index 2:112
      Index 2:113
      Index 2:114
      Index 2:115
      Index 2:116
      Index 2:117
      Index 2:118
      Index 2:119
      Index 2:120
      Index 2:121
      Index 2:122
      Index 2:123
      Index 2:124
      Index 2:125
      Index 2:126
      Index 2:127
      Index 2:128
      Index 2:129
      Index 2:130
      Index 2:131
      Index 2:132
      Index 2:133
      Index 2:134
      Index 2:135
      Index 2:136
      Index 2:137
      Index 2:138
      Index 2:139
      Index1
      Array Length14
      Index2
      Array Length14
      Index3
      Array Length14
      Index4
      Array Length14
      Index5
      Array Length14
      Index6
      Array Length14
      Index7
      Array Length14
      Index8
      Array Length14
      Index9
      Array Length14
      Index10
      Array Length14
      Index11
      Array Length14
      Index12
      Array Length14
      Index13
      Array Length14