
Welcome Guest
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
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 |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |



