So I've filled an array with Project objects that I now want
to add to the stage. This works fine and it displays nice.
But I can't access these projects anymore only the last one,
because the ref:UIComponent is always overwritten.
The ref is a public variable, because I need to use it in the
projectComplete function (worked fine with one project object).
In my AS1/2 days I would have used something like :
_root["project"+i] = new UIComponent();
No offense intended, but you probably should have stopped
using "_root" since AS 2.0. I forbid people to use it on my
projects. That said, I assume you had a really really good reason
for needing it. ;-)
Anyway, in AS 3.0 there is parentDocument, parentApplication,
and Application.application for accessing the "root" object. See if
any of those are what you are looking for.
Finally, try not to post code with "[" "i" "]" in it. It
becomes the italic tag and doesn't display. Put a space between the
brackets like so: [ i ]. And then your posted code can be as close
to the original as possible. I really wish Adobe would fix this
with a "code" tag or something...