Before creating Hello World example, you need flash builder 4 installed already in your system. Open Flash Builder 4 and follow the following steps to create this example.
Step 1: Go to File->New->Flex Project and click on Flex Project
Step 2: Enter project name. For this example, it is HelloWorldApp as shown int the picture below. Let the Use default location option selected if you want to make the application in the default directory the flash builder selects. Also, you can select any other location which suits you best.
Step 3: Click Finish. Project directory structure is displayed on the left and application source code is displayed on the right. You will see the screen as below.
Step 4: Click the Design tab to see the application in design mode. Components tab on the left displays the list of components.
Step 5: Drag the Label component from the set of components on the left and drop on the application design panel. You will see the label component is created. Change the properties of the label from the properties tab on the right. For this example, change text to "Hello World in Flex 4", text font size to 20 and text font color to "#43B145".
Click the source tab again, the source code modified will be displayed as in picture below:
Step 6: Save all the changes by pressing Ctrl+S and run the application by pressing Ctrl+F11. The default browser opens automatically and application will be displayed on it. The output of our example will be like below:
This is simple hello world application, now you can modify the application based on the requirement of your application. For this you need to learn about all components flex provides.
Posted on: April 16, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles