This is G o o g l e's cache of http://www.flashsandy.org/forum/index.php?showtopic=583&pid=3508&mode=threaded&show=&st=& as retrieved on 18 Jul 2007 09:13:19 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:KfK6gi41BVUJ:www.flashsandy.org/forum/index.php%3Fshowtopic%3D583%26pid%3D3508%26mode%3Dthreaded%26show%3D%26st%3D%26+site:www.flashsandy.org/forum+showtopic&hl=en&ct=clnk&cd=110


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: showtopic

Welcome Guest ( Log In | Register )

> Dynamic Object Creation, How do I create an Object3D using a dynamic name?
Jason Davisson
post Yesterday, 06:38 PM
Post #1


Newbie
*

Group: Members
Posts: 7
Joined: 9-May 07
Member No.: 1,143



i have created a loop that will allow me to create an object3d more than once by using a counter. i want this counter to somehow be used in the name of the object3d.

var i = 1;
var Name+i = new Pyramid( 40, 40, 40);

i know this is not right. i would like to dynamicaly change the object called each time it loops to create soemthing like this.

first run, var Name1 = new Pyramid( 40, 40, 40);
second run, var Name2 = new Pyramid( 40, 40, 40);
third run, var Name3 = new Pyramid( 40, 40, 40);

how do i get this effect with a dynamic name in a loop so I can add several objects, transform them, and offset them, all from within a loop?

This post has been edited by Jason Davisson: Yesterday, 06:38 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Rafajafar
post Yesterday, 11:09 PM
Post #2


Newbie
*

Group: Members
Posts: 1
Joined: 4-June 07
Member No.: 1,220



QUOTE(Jason Davisson @ Jul 17 2007, 06:38 PM) *

i have created a loop that will allow me to create an object3d more than once by using a counter. i want this counter to somehow be used in the name of the object3d.

var i = 1;
var Name+i = new Pyramid( 40, 40, 40);

i know this is not right. i would like to dynamicaly change the object called each time it loops to create soemthing like this.

first run, var Name1 = new Pyramid( 40, 40, 40);
second run, var Name2 = new Pyramid( 40, 40, 40);
third run, var Name3 = new Pyramid( 40, 40, 40);

how do i get this effect with a dynamic name in a loop so I can add several objects, transform them, and offset them, all from within a loop?



var Name:Array = new Array();

loop on i {
Name[i] = new Pyramid(arguments);
}
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 18th July 2007 - 08:55 AM
phpMyVisites