Solved

property/way to give instance name to sprites created from array loop

Posted on 2011-03-10
2
562 Views
Last Modified: 2012-05-11
i have some AS3 code that loops through an array creating sprites for each item in the array and places them on the stage. i would like to be able to give a name or something so that I can reference the sprites and  control them. i am hoping there is a way to do this.  is there a sprite property i can set while looping through my array? or another way of doing this?
0
Comment
Question by:conagraman
2 Comments
 
LVL 5

Accepted Solution

by:
gingermoleman earned 500 total points
ID: 35097915
Hi,

Yes in your loop have

sprite.name="sprite"+a;

where sprite is the name of the created object and a is the loop index

GMM
0
 
LVL 10

Author Closing Comment

by:conagraman
ID: 35100610
that worked like a charm

thanks!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question