# Array Question

**URL:** <https://forum.kirupa.com/t/array-question/185103>\
**Category:** Uncategorized\
**Created:** [April 10, 2006, 11:40pm UTC](https://forum.kirupa.com/t/array-question/185103 "2006-04-10T23:40:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![darylmeter](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@darylmeter](https://forum.kirupa.com/u/darylmeter)\
**Post date:** [April 10, 2006, 11:40pm UTC](https://forum.kirupa.com/t/array-question/185103/1 "2006-04-10T23:40:09Z")

</div>

Hello - im stuck on a probably simple problem.  
I have an array of images and i wan to populate some holders.  
heres the code

```auto
this.pArray = new Array(image);
this.pArray = image.split(", ");
total = this.pArray.length;

i = 0;
while (i<28) {
loadMovie(this.pArray*, this.bar.photo* );

i++;
}

```

The problem is with the “this.bar.photo\*” as its identifier is not being updated.  
Can anyone see what I am missing?

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 11, 2006, 12:01am UTC](https://forum.kirupa.com/t/array-question/185103/2 "2006-04-11T00:01:41Z")

</div>

i assume u have 28 photo movie clips? from photo0 to photo27? if so use this.bar[“photo”+i] to reference your holder movie clips.

yay 700 posts!

---

<div class="post-metadata">

**Author:** ![darylmeter](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@darylmeter](https://forum.kirupa.com/u/darylmeter)\
**Post date:** [April 11, 2006, 12:15am UTC](https://forum.kirupa.com/t/array-question/185103/3 "2006-04-11T00:15:02Z")

</div>

YES! Thats the one - cheers mate

---

<div class="post-metadata">

**Author:** ![darylmeter](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@darylmeter](https://forum.kirupa.com/u/darylmeter)\
**Post date:** [April 11, 2006, 12:30am UTC](https://forum.kirupa.com/t/array-question/185103/4 "2006-04-11T00:30:24Z")

</div>

Moving on now, how would i approcah a similar problem of attaching a link to a dynamic movie.Its the linker\*, and window\* areas.  
The “link”+i movies are being dynamically created succeessfully, its just getting the dynamic link onto them.

here my code

```auto
this.pArray = new Array(image);
this.pArray = image.split(", ");
//this.pArray = split(, );
total = this.pArray.length;
link = link.split(", ");
blank = blank.split(", ");
i = 0;
var xPos = 0;
var yPos = 0;
var xPosl = 0;
var yPosl = 0;
while (i<total) {
tellme = this.pArray;
this.bar.attachMovie("photoHolder", "photo"+i, i, {_x:xPos, _y:yPos});
xPos += this.bar["photo"+i]._width+3;

this.bar.attachMovie("linkage", "link"+i, i+100, {_x:xPosl, _y:yPosl});
xPosl += 106;

loadMovie(this.pArray*, this.bar["photo"+i] );

linker* = link*;
window* = blank*;

    if(linker* != "")
    {this.bar["link"+i].onRelease = function() {
            getURL(linker*, window*);
            trace(linker*);
        };
        }
else{}
i++;
}

```

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 11, 2006, 12:43am UTC](https://forum.kirupa.com/t/array-question/185103/5 "2006-04-11T00:43:00Z")

</div>

```auto

this.pArray = new Array(image);
this.pArray = image.split(", ");
//this.pArray = split(, );
total = this.pArray.length;
link = link.split(", ");
blank = blank.split(", ");
i = 0;
var xPos = 0;
var yPos = 0;
var xPosl = 0;
var yPosl = 0;
while (i<total) {
tellme = this.pArray;
this.bar.attachMovie("photoHolder", "photo"+i, i, {_x:xPos, _y:yPos});
xPos += this.bar["photo"+i]._width+3;

this.bar.attachMovie("linkage", "link"+i, i+100, {_x:xPosl, _y:yPosl});
xPosl += 106;

loadMovie(this.pArray*, this.bar["photo"+i] );

this.bar["link"+i].linkVar = link*///or whatever the 
this.bar["link"+i].windowVar = blank*

i++;
}

```

then inside the symbol in the library that you use to attach, the one called “linkage”, put the on(release) code on a button inside it, to call a

getURL(linkVar, windowVar);

easy 😃

---

<div class="post-metadata">

**Author:** ![darylmeter](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@darylmeter](https://forum.kirupa.com/u/darylmeter)\
**Post date:** [April 11, 2006, 12:49am UTC](https://forum.kirupa.com/t/array-question/185103/6 "2006-04-11T00:49:28Z")

</div>

Excellent, thank you so much,  
that 1 1/2 days of problems solved in minutes.  
Cheers

---

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [April 11, 2006, 1:41am UTC](https://forum.kirupa.com/t/array-question/185103/7 "2006-04-11T01:41:39Z")

</div>

no worries 😉
