great! thanks...
________________________________________
From: [email protected]
[[email protected]] On Behalf Of Nathan Mynarcik
[[email protected]]
Sent: Wednesday, April 28, 2010 12:30 PM
To: [email protected]
Subject: Re: [Flashcoders] arranging
This worked with three circles on the stage in the timeline. All have
the same eventlistener to them. Does error if the object is already
at the top.
Have fun!
function getIndex(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(getChildByName(e.currentTarget.name));
var index:int;
index = getChildIndex(mc);
setChildIndex(mc, index+1);
}
-Nathan
Quoting Nathan Mynarcik <[email protected]>:
> 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
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders