# Simple (?) actionscript question

**URL:** <https://forum.kirupa.com/t/simple-actionscript-question/123828>\
**Category:** Uncategorized\
**Created:** [September 27, 2004, 8:44pm UTC](https://forum.kirupa.com/t/simple-actionscript-question/123828 "2004-09-27T20:44:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henxon](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@Henxon](https://forum.kirupa.com/u/Henxon)\
**Post date:** [September 27, 2004, 8:44pm UTC](https://forum.kirupa.com/t/simple-actionscript-question/123828/1 "2004-09-27T20:44:40Z")

</div>

Hi

I want to access _pArray_ outside the _onData()_-function:  
\*  
imgArray = new pArray();

lv = new LoadVars();  
lv.load(“filearray.php”);

lv.onData = function(text){

```
 pArray = text.split("&");
 _root.textArea1.text = "pArray:"+pArray;

```

}

imgArray = pArray;  
\_root.textArea2.text = “imgArray:”+imgArray;  
\*

I tried to create an imgArray outside and use that one, but it didn’t work. What should I do to be able to access the pArray outside the function? The textareas are just for showing what the arrays contain, wich will be dynamicly loaded images, using a PHP script. I’m trying to create [this gallery function.](http://www.kirupaforum.com/forums/showthread.php?t=57082&highlight=dynamic+image)

regards

Henrik, sweden
