# Scope trouble

**URL:** https://forum.kirupa.com/t/scope-trouble/163654
**Category:** flash
**Created:** [September 24, 2005, 1:21pm UTC](https://forum.kirupa.com/t/scope-trouble/163654 "2005-09-24T13:21:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ScriptSuite](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@ScriptSuite](https://forum.kirupa.com/u/ScriptSuite)
#### Post date: [September 24, 2005, 1:21pm UTC](https://forum.kirupa.com/t/scope-trouble/163654/1 "2005-09-24T13:21:59Z")

</div>

[left]item\_bin = [];  
Myfunction = function () {  
var service = new WebService(“A service”);  
serviceResultObj = service.FetchSomething(this);  
service.onLoad = trace(“Loading”);  
serviceResultObj.onResult = function(result) {  
for (h = 0; h \< result.length; h++) {  
title = result[h].attributes.title;  
var ob = {title:title};  
item\_bin.push(ob);  
}  
trace("VerzamelBin " + verzamel\_bin); // Succes  
\_global.verzamel\_bin = verzamel\_bin;  
};  
};  
Myfunction();  
trace("Global\_item\_bin " + \_global.item\_bin); // No Succes

I need this object “item\_bin” outside my function.  
It has been told to me to use ‘Array:concat()’ to copy the object.  
Can anyone help me with this?

Big ==\> TIA[/left]
