eka,
thanks for the link...i can see many uses for it in the future

p

On 9/2/07, [p e r c e p t i c o n] <[EMAIL PROTECTED]> wrote:
>
> thanks guys!
>
> the array idea is exactly what i did....i just don't know why it took so
> long to come to me...i just got stuck in this one way of thinking, but
> thanks so much for the suggestions...i'm trying to learn as3 and flex and
> fms and air while i'm in-between jobs and my old bad habits (that as1/as2
> let me form) have to be done away with in favor of new ones :)
>
> cheers
> p
>
>
> On 9/2/07, T. Michael Keesey <[EMAIL PROTECTED]> wrote:
> >
> > On 9/1/07, [p e r c e p t i c o n] <[EMAIL PROTECTED]> wrote:
> > > greetings experts!
> > >
> > > way back in the days of as2 you could do something like this...
> > >
> > > this["somevarname"+someIndex] = new Something();
> >
> > Even in AS2, it seems that this would be better done with an array.
> >
> > var somethings:Array = [];
> > something[someIndex] = new Something();
> >
> > (Same syntax in AS3.)
> >
> > Come to think of it, even in AS1 it would be better done with an
> > array. The last time I would have used such a structure was in Flash 4
> > Actions.
> >
> > One exception might be for MovieClip/Button/TextField instances in
> > AS2. Often in AS2 it was handy to grab those by their name, since they
> > are often made through the IDE rather than through code. The new way
> > of retrieving a composed display object by its name is the
> > getChildByName() function of the DisplayObjectContainer class (which
> > Sprite, among others, extends). So you could do something like this
> > within some class that extends DisplayObjectContainer:
> >
> > var currentObject:DisplayObject = getChildByName("someVarName" +
> > someIndex);
> >
> > I'm still not sure if that would be the most elegant solution in most
> > situations, though. It still seems to me that in most cases an array
> > should be somehow involved.
> >
> > --
> > Mike Keesey
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to