Created
October 26, 2011 22:13
-
-
Save mewdriller/1318052 to your computer and use it in GitHub Desktop.
A hack to get RobotLegs to recognize/mediate the views already on the stage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.base2 | |
{ | |
import flash.display.MovieClip; | |
import flash.display.DisplayObject; | |
import flash.events.Event; | |
public class Main extends MovieClip | |
{ | |
public function Main() | |
{ | |
// TODO: Setup your context / context-view here. | |
// Remove all the children from the display-list: | |
var children:Array = []; | |
while (numChildren > 0) | |
children.push(removeChildAt(0)); | |
// Push them back to the display-list (preserving depth order): | |
while (children.length > 0) | |
addChild(children.shift()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment