Just added a new feature, as suggested by Karim in the previous post. This saves a hash of all components that have id attributes, and then allows you to find any component by its id. Here’s an example:
public class Playground extends Sprite
private var config:MinimalConfigurator;
public function Playground()
var xml:XML =
config = new MinimalConfigurator(this);
public function onClick(event:Event):void
var btn:PushButton = config.getCompById(“foo”) as PushButton;
btn.label = “goodbye”;
trace(btn.name); // foo
Also, it maps the id to the component’s native name property, in case that might be useful.
All in all, this allows you to access multiple components without having to make a bunch of public variables.