What would my parentDisplayObject be if the objects were drawn directly
onto the stage? They are now in an object array and I am manipulating
them from there. I noticed that sometimes they drag behind other
objects though, so wanted to make sure they always be on top.
function startDragging(event:MouseEvent):void {
for (i= 0; i < count; i++) {
if (event.target == aButtons[i] ) {
trace("start dragging");
event.target.startDrag();
}
stage.addEventListener(MouseEvent.MOUSE_UP,
stopDragging);
}
}
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of jonathan
howe
Sent: Monday, September 29, 2008 3:34 PM
To: Flash Coders List
Subject: Re: [BULK] Re: [Flashcoders] Layering, drawing a blank
Importance: Low
It absolutely has: the whole display model has changed for the better.
Arguably the most understandable way to do it is a removeChild and
addChild
in succession.
parentDisplayObjectName.removeChild(childYoureMoving);
parentDisplayObjectName.addChild(childYoureMoving);
This works because addChild() puts the new object at the top of the
display
order.
The display object model is definitely worth doing a little reading on,
though.
-jonathan
On Mon, Sep 29, 2008 at 3:06 PM, Lord, Susan, CTR, DSS <
[EMAIL PROTECTED]> wrote:
> AS3.
>
> I tried swapDepth() and getDepth, and a fewothers but none worked. Has
> it changed since AS2?
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Matt
S.
> Sent: Monday, September 29, 2008 3:02 PM
> To: Flash Coders List
> Subject: [BULK] Re: [Flashcoders] Layering, drawing a blank
> Importance: Low
>
> AS2 or AS3?
>
> On Mon, Sep 29, 2008 at 2:48 PM, Lord, Susan, CTR, DSS
> <[EMAIL PROTECTED]> wrote:
> > Hi there,
> >
> > I cannot for the life of me remember what the method is to have a
> layer
> > come to the top of the stacking order when you click it.
> >
> > Any help you can provide is appreciated!
> > Thanks,
> > Susan
> > _______________________________________________
> > 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
>
--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders