Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-10
2
Medium Priority
?
571 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
gingermoleman earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

705 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