“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

(As2) swapDepths Vs (As3) setChildIndex

Posted: November 6th, 2007 | Author: Ivan Valadares | Filed under: Actionscript2, Actionscript3, Tutorial | 7 Comments »

AS2 was an anarchy language, if you need to put a movieClip visually above all the things in the stage, you can do movieClip.swapDepths(this.getNextHighestDepth()). So it works, but in reality your are swapping your movieClip with a movieClip that didn’t exist, so in AS3 you can’t do that but we have setChildIndex method. You Can do setChildIndex(numChildren-1)

AS2
AS2
AS3
AS3