Skip to content

Instantly share code, notes, and snippets.

@mewdriller
Created October 26, 2011 22:13
Show Gist options
  • Save mewdriller/1318052 to your computer and use it in GitHub Desktop.
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.
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