Make a grid menu using an array

Advertisement
Hi,
I was wondering if there is a way to make a menu of buttons from an array arrange themselves in a 3x3 grid.
I have used code i have gotten from this forum to place them next to each other onto the stage (which was quit awesome) and i have found code to place them in a rotating cell from an array but is it possible to do it as a grid?
Any help would be great
Advertisement

Replay

use Math.floor and the modulo operator to construct grids:
var xSpace:int = 100;
var ySpace:int=100;
var rowNum:int=3;
var colNum:int=3;
for(var i:int=0;i<yourarray.length;i++){
yourarray[i].x=xSpace*i%rowNum;
yourarray[i].y=ySpace*Math.floor(i/colNum);

Make a dynamic menu using JSP or Javascript

Hi , I am trying to make a dynamic menu that is using data retrieved from database in the form of a list. I have a javascript to make a tree structure menu, but i need to iterate through the list i am reciveing from the database to make the tree stru

I want to make a grid. Apple said Pages will do the job. I need to change the grid to 1 in. x 1 1/2 in. squares. What tutorial can I use to show me how to do this?

I want to make a grid. Apple said Pages will do the job. I need to change the grid to 1 in. x 1 1/2 in. squares. What tutorial can I use to show me how to do this?A calendar is not difficult nor does it take long once you know where the dates fall. S

Can you make a Spry Menu Bar a snippet?

Is there a way to make a Spry menu bar a snippet so you can edit the snippet and have it updated on all pages?The include method is good, but make sure to use root relative links in the menu so that if you place the menu on a page in a sub folder of

Trouble scrolling on the main menu using my dvd player.

I can't seem to move to the scenes button when I'm on the main menu using my DVD player. This function seems to work fine on my computer. Before I burn another (very long) disc and try again, does anyone have any suggestions? NatalieIf I have two but

Want to make JMenuMaker to be used for web!!!

I want to know is there a way to make drop-down menu in the middle of a web page for example think about the browser menubar in the top of this message. Can the predefined java classes be used for this job? you may asked what it will be used for.If y

When itouch is moved, it makes a jingle noise and moves to a random song. Makes it impossible to use during exercize. Anything I can do?

While listening to music on itouch, if it is moved other than very gently, it makes a ringing - jingle noise and goes to a random song. This makes it impossible to use during any kind of exercize. I tried restoring my itouch, and am having the same p

Hi iam using iphone 5s which is locked to EE carrer. I am not able to make a conference call using this phone in india

Hi iam using iphone 5s which is locked to EE carrer. I am not able to make a conference call using this phone in indiathen call EE if they are your carrierRead other 2 answers

When i import movies from my iPhoto app to my iMovie app does it make a copy (thereby using double the hard disk space) or does it link to my iPhoto app? The reason i ask is i want to archive all my videos from iPhoto/iMovie. HELP!

When i import movies from my iPhoto app to my iMovie app does it make a copy (thereby using double the hard disk space) or does it link to my iPhoto app? The reason i ask is i want to archive all my videos from iPhoto/iMovie. Do i need to archive the

HT204053 can i make two apple id using same credit card?

can i make two apple id using same credit card?You can create an iTune and App Store account without credit card details 1. Sign out of current Apple ID if you are sign-in to one (important) 2. Go to App Store and select a free app 3. Tap INSTALL APP

. NET to call Oracle stored procedure, use an array of types of parameters

. NET to call Oracle stored procedure, use an array of types of parameters Step1:(In the Oracle database define an array of types) CREATE OR REPLACE TYPE STRING_VARRAY AS VARRAY (1000) OF NVARCHAR2(255) Step2: CREATE OR REPLACE PROCEDURE Test (i_test

How to use an array in a SQL Query

Hi I need to use an array of numbers such as a VARRAY or Associated Index Array so that I can do the following SQL: select * from * where array is null or id is in array So that if the array is empty it will return all the records, and if the array i

I want to make a web page using labview.

I want to make a web page using labview. I have the internet tool kit. Where do I start. Till now all I have used labview is for industrial I/O and mmi. I have used various TCP UDP comms for network purposes, but I haven't ever done anything with Web

Writing a menu using JavaScript

I need to write a menu using JavaScript. I'm new to using JavaScript. I was told that i can set ScriptLanguage to "Java" in an HTML document and then use Java inside. But i dont understand how that can be done. Please helpJava != JavaScript i.e.

Can/how do i make an iTunes library using data (songs, apps, e.t.c.) to my computer.

Not all my music is on my old computer, and no apps are. This is as I exported the library to my D: drive, added more stuff, while syncing to it, then re-imported it. My iPod is on iOS 4 and want to upgrade to 5, but if I do, then I will lose all my

Can you make a screen capture using PS?

I wanted to know if I can make a screen capture using Photoshop cs5.5 or do I have to use software such as Snag It? Thanks BarbaraHello, Kar209. Photoshop is an image editing software, it cannot do screen or video screen captures. There are dedicated

Using Variables/Arrays from one class in another

Hello all, First, to explain what I am attempting to create, is a program that will accept input of employee names and hours worked into an array. The first class will accept a command line argument when invoked. If the argument is correct, it will c

Using Assoc Arrays in OBPM 10GR3 for 25 million comparisons

Can we use Associative arrays in OBPM 10GR3 to do 25 million comparisons or even more than that? I have two assoc arrays which I compare with each other 25 million times by looping them one inside the other. For e.g. for(int i = 0; i < 5000; i++) for

How to use the array elements

Hi, i'm trying to automate a questionary using array. // In the compositionReady for the stage sym.actual = 0; sym.arr = [ "Hi","Love","You" ]              // This is my question array. sym.checkArr = function(){             

Using Primitive Arrays in JPA

Is it possible to persist and store arrays of primitive types using the Java Persistence API? If so, is there any special annotation that the array requires?Don't use ASSOC Arrays. Use SETs. Also increase the JTA timeout in Weblogic to like say 600 s