<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:s="library://ns.adobe.com/flex/spark">
<mx:Script>
import spark.components.Button;
import spark.events.ElementExistenceEvent;
private function handleElementAdd( evt:ElementExistenceEvent ):void
{
trace( (evt.element as Button).label + " has been added." );
}
</mx:Script>
<s:Group elementAdd="handleElementAdd(event);">
<mx:Button depth="100" label="button 1" />
<mx:Button label="button 2" />
</s:Group>
</mx:Application>
|