From 8cddf9ef1baace35e1ede47f109ab94b737cd3e4 Mon Sep 17 00:00:00 2001 From: Tom Conkling Date: Tue, 27 Jan 2009 23:21:19 +0000 Subject: [PATCH] Allow Flash to throw an exception if the input is invalid git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@766 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/as/com/threerings/flash/DisplayUtil.as | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/as/com/threerings/flash/DisplayUtil.as b/src/as/com/threerings/flash/DisplayUtil.as index 6609ec73..32e3c181 100644 --- a/src/as/com/threerings/flash/DisplayUtil.as +++ b/src/as/com/threerings/flash/DisplayUtil.as @@ -38,8 +38,7 @@ public class DisplayUtil newChild :DisplayObject, below :DisplayObject) :void { - var ii :int = (below.parent == container ? container.getChildIndex(below) : 0); - container.addChildAt(newChild, ii); + container.addChildAt(newChild, container.getChildIndex(below)); } /** @@ -49,8 +48,7 @@ public class DisplayUtil newChild :DisplayObject, above :DisplayObject) :void { - var ii :int = (above.parent == container ? container.getChildIndex(above) + 1 : 0); - container.addChildAt(newChild, ii); + container.addChildAt(newChild, container.getChildIndex(above) + 1); } /**