Flex Hello World Example

flex hello world

by Kathy on April 12, 2009

Thought I’d take a moment today to post a very simple flex example ‘Hello World’ component.  It’s a good beginning!

Here’s the final product:

Here’s a glimpse of the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
   layout="absolute" width="340" height="120">
   <mx:Script>
      <![CDATA[
         import mx.controls.Alert;

         private function greetings():void{
            Alert.show('Hello World!');
         }
     ]]>
   </mx:Script>
   <mx:Button  label="Greet the World!"
      click='greetings()'
      fontSize="16"
      top="10"
      bottom="10"
      left="10"
      right="10"
   />
</mx:Application>

Comments on this entry are closed.