Ever pondered that question? Until a few weeks ago I had never used an array before. They are very simple objects that let you store and retrieve data.

Below are detailed instructions on how an array works.

When you setup an array

Try double clicking on the array object. A menu appears. This is where you will setup what your array looks like.

But first, you need to know, what an array is. An array is much like a data table(Much like the one below)

<table border="1" cellpadding="0"cellspacing="0"style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
<td width="25%"> </td>
</tr>
</table>

Ok. Now in this case, when the menu pops up you would select X=4, Y=3.

The table(or array) is either a numerical or text array(which can be specified by double clicking on the array object. The array will store text, and numbers. And you can save them. Leave your applicatoin, and then load them again.

Ok, now lets pretend that table, is an array object. And your program is a phone book. Now lets pretend you want to be able to seperate pages...It would be a pain to create several arrays, and switch back and fourth retrieving information from one another....The array object is more than just a data table. It is 3D in the sense that you can store information on multiple layers. Basically what this means is that each layer could be a page of your phonebook. And you could store the names and addresses of your friends within this phonebook.(And the numbers in a seperate array).

Using your array
Okay, now we need to learn how to utilize this plug-in. Below is a list of what it can be used for.

-It can be used as an ini, but is a little trickier.-
-It can be used as a storage place(like a phonebook).-
-It can be used as a temporary holding place for text(like in a form).

Now I will discuss the actions, and how to use them.

To do this, you should follow the example.

1.) Create a new array object. Set it to a text array.
2.) Create a string object.
3.)Go into the events editor, and right click "NEW CONDITION". Make the event upon pressing spacebar.
4.)In the events under the array object insert WRITE STRING TO X. insert the text"yeah" and hit enter. Now hit 1.

The text will be inserted in the first dimension of your array(Or as show below.

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="20%">
<p align="center">Yeah</td>
<td width="20%"> </td>
<td width="20%"> </td>
<td width="20%"> </td>
<td width="20%"> </td>
</tr>
</table>

If you enter 2 into the next dialoge box, the text would be in the second area.

(Retrieving the data will come later on...)

XY table

Suppose you wanted to do the same thing except with XY dimensions...

(This continues from beforehand...so you might get stuck if you haven't done the first part.)

Now select upon pressing CTRL write string to XY. Write no in the first box. 1 in the second. And 2 in the third.

The first is always the string you want to write.

The 2nd is the X dimension
The 3rd is the Y dimension.
The 4th is the Z dimension.

Your table would look like this if you could view it(Ill get to that later).

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="50%">Yeah</td>
<td width="50%"> </td>
</tr>
<tr>
<td width="50%">NO</td>
<td width="50%"> </td>
</tr>
</table>

XYZ
XYZ is the same as XY, or X, but with multiple pages. Meaning it's like a book of tables...You can flip through date tables.

Other Writing information
You can write values(numbers) and retrieve them to be saved. As well as text. You can also write to a current position(Meaning you write, were an invisible cursor is). I will explain changing the current position next.

Changing the current position

This is quite"self-explanatory", once I explain the first one.

You can either change the current X position(Set the invisible cursor to a selected X position box.) And do the same with Y, and z. You can also add 1 to it each time, which makes it easy to make phone number lists and things of that sort.

Before I explain Saving, and Loading, I must explain the crucial part....Retrieving information.

Retrieving information
The array object is invisible. You can't see it. Therefore it might be a good idea to plan out what you want to put on it using a data table.

Because it is invisible, you will need to retrieve it's information using other objects. I use the String object the most, and I suggest you do also.

Lets go back to that string object you created(if you haven't, do so). Now make a new event...Upon pressing enter. Then go under the string object and select "SET ALTERABLE STRING".

Under that select, RETRIEVE DATA FROM OTHER OBJECT. Goto the array, and right click it. Now select READ VALUE FROM XY position(or if you are making an XYZ, or just X...select your type.)

You should get something like this:

StrAtXY( "Array", > Enter value here <, > Enter value here < )

The <, and > keys, should be erased, and the spaces kept in between the {, and }.

Insert from where you want to take the date. For this example insert.

StrAtXY( "Array", 1, 1 )
And do the same action(except with a different key-Like SHIFT, instead of CTRL., and insert
StrAtXY( "Array", 1, 2 )



Now run your application and press SPACE, and then CTRL. As you can see your string was set to YEAH.

Now press SHIFT. The string is set to what data was left in the arrays "boxes".

Saving, and Loading

Usually when I save an array I will insert the following. You need to click expression first.(I think you need Fusion 1.5 too.

" Appdir$+MyArrayFile"

But you can also insert it using a filename selector. And, you can also save it using the FILENAMES manu within the SPECIAL Conditions area by clicking RETRIEVE DATA FROM ANOTHER OBJECT after you have clicked expression, which proceeds clicking SAVE FILE AS, and EXPRESSION.

Loading
Set an action, if you want to load a file automatically(without user input), hit LOAD ARRAY FROM FILE, and copy what you wrote before. In this case, that would be:

" Appdir$+MyArrayFile"

Press space, and ctrl. The same thing will happen!...

Okay, not as hard as it seems. If this doesn't help you a lot, then at least it will get you started on learning it yourself.

<a href="http://trexgames0.tripod.com">T-Rex Games<a/>


Image