Advertisement

10.13.2008 at 05:55AM PDT, ID: 23809298 | Points: 500
[x]
Attachment Details

How to a number at the end of an object name in actionscript 3?

Asked by katyjack in ActionScript

Tags: , ,

So, I've got this block of code that is working fine right now:

function displayBox(boxX,boxY,i):void{
      var box:mcAvatar = new mcAvatar();
      box.x = boxX;
      box.y = boxY;
      addChild(box);
}

However what I'd like to do is make multiple boxes by adding the value of 1 to the box variable name.
var box + i:mcAvatar = new mcAvatar();

doesn't work. Any suggestions on how to accomplish this?

Start Free Trial
[+][-]10.13.2008 at 06:46AM PDT, ID: 22702332

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.13.2008 at 10:11PM PDT, ID: 22708724

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.16.2008 at 11:44AM PDT, ID: 22734396

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628