first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Adobe Flex 2: The Minimal MXML Application with an ActionScript3 Package

This is the MXML in a file called Client.mxml:

<?xml version="1.0" encoding="UTF-8"?> <mx:Application x­mlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" verticalAlign="center" initialize="ClientAction.Initialize()" >

</mx:Application>

This is ActionScript3 package in a file called ClientAction.as:

package { import mx.controls.Alert; import mx.core.Application;

public class ClientAction
{
	public static function Initialize():void
	{
		if(ClientAction._action == null)
		{
			ClientAction._action =
				new ClientAction(Application.application as Application);
		}
	}

	public function ClientAction(thisApplication:Application)
	{
		//TODO: do some stuff with the root application.
	}

	private static var _action:ClientAction = null;
}

}

mod date: 2007-11-14T05:08:56.000Z