# Event.COMPLETE issue‏

**URL:** https://forum.kirupa.com/t/event-complete-issue/292394
**Category:** flash
**Created:** [July 14, 2009, 12:00am UTC](https://forum.kirupa.com/t/event-complete-issue/292394 "2009-07-14T00:00:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theycallmegosu](https://avatars.discourse-cdn.com/v4/letter/t/d2c977/32.png) [@theycallmegosu](https://forum.kirupa.com/u/theycallmegosu)
#### Post date: [July 14, 2009, 12:00am UTC](https://forum.kirupa.com/t/event-complete-issue/292394/1 "2009-07-14T00:00:14Z")

</div>

I have the issue here. can someone help me plz???

getBarcodes();

function getBarcodes():void {

for (var reg:int = 0; reg\<regionIDs.length; reg++) {  
for (var vin:int = 0; vin\<vineyardIDs.length; vin++) {

```
 var pagination_variables:URLVariables = new URLVariables();
 // Build the varSend URL variable
 var pagination_varSend:URLRequest = new URLRequest("[[COLOR=#0068cf]http://localhost/cms_control.php[/COLOR]](http://localhost/cms_control.php)");

 pagination_varSend.method = URLRequestMethod.POST;
 pagination_varSend.data = pagination_variables;
 // Build the varLoader variable
 var pagination_varLoader:URLLoader = new URLLoader();
 
 pagination_varLoader.addEventListener(Event.COMPLETE, getData);
 pagination_variables.sendRequest = "get_pagination";
 pagination_variables.categoryNameID = categoryIDs[cat];
 pagination_variables.varietyID = varietyIDs[vari];
 pagination_variables.regionID = regionIDs[reg];
 pagination_variables.vineyardID = vineyardIDs[vin];
 pagination_varLoader.load(pagination_varSend);
}

```

}

getTheAmountofData();  
}

it seems like flash does getTheAmountofData() function first, then does all the getData functions in the for loop. but what i need is to call all the getData functions first, push the datas into an Array, then call the getTheAmountofData() function. how can i do that?? Hope it make sense. Cheers.
