Solved

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

Posted on 2011-03-10
2
557 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now