Flash Button Array

A three frame sequence which loops around frame 2 until the last of a group of variables has safely arrived, either from a text file, or a requested url. The movie arranges all the buttons in the last frame where any unique labels and values can be assigned, and stops. The code for the buttons is a call to a function where it's name, ID, and any other data created and passed by the button is processed.
e.g:
  on (release) {
    var1 = this._width;
    var2 = this.var_created_or_supplied_at_runtime;
    a_function_wot_i_rote(var1, var2);
  }

Button Components:

One "original" movie clip for each button type to be duplicated. Each gets copied as many times as there are elements in the label arrays. The label arrays can go in the Actionscript or be input from a text file. One "Dynamic" text box just to output button click variable values.

  The button panel parts:
  The working panel.
The external variables text file (no linefeeds).
 

Load the variables in frame 1 ...
 

...then loop around frame 2 asking...
 

In frame 3 the successfully loaded variables can be assigned
to arrary elements, and the array lengths detected.

 

Set starting x and y values and duplicate the first button clip.
 

The A to Z buttons require a loop that will reset x to it's starting value,
and increase y by the height of a button at the half-way point.

 

Alter a few variables and we have four rows and two columns of larger buttons.
 

The last group need the final row to be offset if those two buttons are to be centered.
 

email chipworker