LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
  #1  
Old 10-31-2005, 10:08 PM
mackey555 mackey555 is offline
Registered User
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0
mackey555 is on a distinguished road
Array of objects

How do I make an array of objects? I want to create an array room1-room7. The code below seems to create strings instead of objects.

Actionscript:
var roomArr:Array = new Array();
 for(i=1; i<=tRooms; i++) {
 roomArr.push("room" + i);
 }
 trace(roomArr);

Last edited by Scottae : 11-01-2005 at 06:00 AM Reason: Format with AS tags
  #2  
Old 11-01-2005, 06:03 AM
Scottae's Avatar
Scottae Scottae is offline
God Moderator
 
Join Date: Oct 2003
Location: United States
Posts: 6,532
Rep Power: 16
Scottae is on a distinguished road
Actionscript:
var roomArr:Array = new Array ();
for(var i = 1; i <= tRooms; i++) 
{
   roomArr.push(new Object ());
}
trace(roomArr);
__________________
Our greatest glory is not in never falling but in rising everytime we fall. - Confucius

Blog | Shared Items
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieving Index positions of an Array objects Maniky80 ActionScript 3.0 1 10-19-2008 11:19 AM
using mouse to choose array of objects in game stevor Newbies 3 08-11-2008 07:13 PM
Help with a Tough Array Randomization/Shuffle Problem TheMediaBoy Actionscript 2.0 10 07-21-2006 09:05 AM
Play Coordinated objects in Array heimer22 Flash MX 2 07-07-2004 10:55 PM
Creating Associative Array Objects Dynamically lukie_be Flash 5 Actionscript 5 09-16-2001 05:24 PM




All times are GMT. The time now is 11:25 AM.