Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: [flasher] Array problem
From: Muzak
Date: Thu, 08 Mar 2001 17:37:49 -0000

I've had a look at the AS, but couldn't really figure out what your goal was. So to the best of my abillity, this is what I come up
with:

arrSquare = new Array("A1", "A2", "A3", "A4", "A5", "A6");
pos = pos+10;
for (i=0; i<arrSquare.length; i++) {
varWidth = _root[arrSquare[i]]._width+10;
if (arrSquare[i] == "A1") {
trace ("movieclip A1");
A1._y = 0;
A1._x = pos+10;
} else {
_root[arrSquare[i]]._x = pos;
_root[arrSquare[i]]._y = 0;
pos = _root[arrSquare[i]]._x;
}
}

What happens here is that you set MC 'A1' at _x= 20
And all the other clips are set to _x=10

If this is not what you intended to happen, let me know.

Muzak
----- Original Message -----
From: "Ed Harvey" <eharveyatiddnet [dot] com>
To: "flasher from chinwag" <flasheratlists [dot] chinwag [dot] com>
Sent: Thursday, March 08, 2001 4:34 PM
Subject: [flasher] Array problem


> I'm having trouble understanding how to use arrays. What I want to do is
> take one of the symbol from the array and set it's position on the screen.
> Then move onto the next one. When I trace the Array, I get the entire string
> when I want just one. This is the script I am using.
>
>
> Ed




[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]