Yup! Get the display list numChildren and subtract 1 from it. That's the number 
you want to set as the new index. 


-----Original Message-----
From: "Lehr, Theodore" <[email protected]>
Date: Wed, 28 Apr 2010 14:04:51 
To: [email protected]<[email protected]>; Flash Coders 
List<[email protected]>
Subject: RE: [Flashcoders] arranging

ok - so I am trying this:

var curChild=getChildByName(e.currentTarget.name);
var curIndex:int=getChildIndex(curChild);
trace(curIndex);

and it seems as though it is counting from the back up... so if I have 12 mcs, 
then the one no top will trace 12... I would think the one on top would be 
1.... I would love to just set it to 1 to make it come to the top and then 
reset it back to it's original number to put it back.... any thoughts....

________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Nathan Mynarcik 
[[email protected]]
Sent: Wednesday, April 28, 2010 1:51 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

Will getChildIndex and setChildIndex not work either for static objects?


-----Original Message-----
From: "Lehr, Theodore" <[email protected]>
Date: Wed, 28 Apr 2010 13:38:39
To: Flash Coders List<[email protected]>
Subject: RE: [Flashcoders] arranging

the issue is that these are mcs that are NOT put there in as but in the IDE.... 
I tried getChildIndex and it says that this is for display objects - not static 
objects... any way to change order with static objects?

________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Nathan Mynarcik 
[[email protected]]
Sent: Wednesday, April 28, 2010 1:33 PM
To: Flash Coders List
Subject: Re: [Flashcoders] arranging

addChild(mc) normally brings them to the top.
------Original Message------
From: Henrik Andersson
Sender: [email protected]
To: Flash Coders List
ReplyTo: Flash Coders List
Subject: Re: [Flashcoders] arranging
Sent: Apr 28, 2010 12:13 PM

Lehr, Theodore wrote:
> If I have mcs that are put on the same layer in the ide - how can I change 
> their order (i.e. send to back, bring forward) in as3?

They will still have different indexes on the display list. Just do the
same old stuff as usual.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to