Building your first Flex app without using FlexBuilder

One of the biggest news this week has been that Adobe has made FlexSDK opensource which is like yay! Well, the SDK has the compiler for the mxml and as code but the FlexBuilder does all this automatically for the user without her having to know the compiler commandline et al; but hoping that Adobe gives out the FlexBuilder to FOSS 😀 I know, i know we geeks can be greedy. Well.. I downloaded the FlexSDK yesterday, now that it was opensource and tried building my first application and guess what? Its very easy. Maybe thats because its the hello world program. Here’s how:

  • Download the SDK from here.
  • Unzip the SDK into a directory of your choice and for the sake of easy; add its bin directory to your path variable.
  • Now to writing your first helloworld program.
  • Most of the code is self explanatory; so I’ll skip the step of having to explain all that to you.
  • The code is as follows. See that you save it into helloworld.mxml
    <?xml version="1.0" encoding="utf-8"?>
    
    <mx:Application
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="absolute"
        backgroundGradientColors="{#ffffff, #ffffff}">
    <mx:Button
          label="Say Hello World"
          click="Alert.show('Hello World!')"
          height="75" width="186"
          horizontalCenter="0"
        verticalCenter="0"/>
    
    <mx:Script>
        <![CDATA[
             import mx.controls.Alert;
        ]]>
      </mx:Script>
    </mx:Application>
  • Compile this file now in the commandline using the command ‘mxmlc helloworld.mxml‘. An output swf file helloworld.swf is created!
  • Compile this file now in the commandline using the command ‘mxmlc helloworld.mxml‘. An output swf file helloworld.swf is created!
  • See how it works in your browser with the flash runtime installed!

Im really hoping I get enough time to try build a simple Eclipse based plugin for Flex using its SDK… Or are there projects already doing it?

Related Posts:

Building a simple ruby chat server with a flex based UI.

Advertisements

3 thoughts on “Building your first Flex app without using FlexBuilder

  1. Hi, Can you please send a details regarding buliding a simple Flex Application using Eclipse without flex builder. please do direct me to concern sites where I can find this help.

    Thanks

    Stalin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s