Creating FLEX Application using Freewares
Posted on July 31st, 2007 in Technology |
(Originally posted on altlimit.com)Flex What is Flex? According to www.flex888.com, Flex is A technology from Macromedia. A development, deployment and runtime package to allow computer users enjoy internet/web software again. Basically Flex is used to make (RIA) Rich Internet Application that can run in any flash player 9 and above.
Why i created this site? I’m a fresh graduate from the course of Computer Science, i do create application softwares and websites(monmonja). I’ve heard of Flex around January 2006 but i haven’t try it until lately. As i was to learn Flex, i have learned that it’s SDK is free but its IDE and the ellipse plugin are not. But i really want to learn Flex so i decided to use freeware softwares to create Flex RIA. While looking for a job, i decided to start learning Flex. Now i know am still a novice but my knowledge might eventually teach other people on how to start using Flex or creating Flex RIA the free way.
Whom is this tutorial for? If your into new stuff and you think that Flex is the stuff for you, if your a semi hardcore coder, if your not doing illegal stuff by cracking Flex Builder, or if you just want to know how to compile mxml file to swf file using the SDK then this tutorial is for you. So what software are needed in order to make Flex swf?
Softwares Needed:
- Flex SDK And Flash Player 9. Click the Download the free Flex
SDK located before Getting Started Tab. - ConText Editor. Any Editor will be fine as long as it can execute batch files for windows.
- Firefox. We Recommend you to use this browser for testing purposes and the tutorial focuses on it.
- AppServe(Optional). This is a web server using Apache, Php, and MySQL.,phpMyAdmin. You can use II2 or any other HTTP Server
Instructions:
First of all download the Flex SDK for free from labs.adobe.com, Click the Download the free Flex SDK Link, it will ask you to either register or login if you have an existing macromedia or adobe account. When you have signed in look for the Flex SDK 2.0(as of may 17,2006) and download the link provided. Save the file in any folder you want. After the download extract the file using winZip or 7zip to any folder of your choice but i would recommend you to extract it to C:\Flex\. Then download the flash player 9 both the activex and plugin for windows from the same site as the Flex SDK but dont install yet until you have firefox on your system. This is a must in order to view the flex swf output.
Now you have the FLEX SDK, its time to download ConText Editor. From the site click download and save the file to your selected path. After download, double click the file you have just downloaded. Install the program that we will be needing later on.
Then download Firefox, it is a browser created by the mozilla foundation, it is free, more stable and cross platform. It has IE tab extension and opera view extension for cross browser testing. It have the web developer Toolbar extension and fireBug for DHTML testing purposes. It has a fireFTP extension for ftp purposes. And many other extension that will help you in creating websites.
AppServe is an optional download but i recommend you to install it too. AppServe is a combination of Apache server, mySQL, php, and phpMyAdmin. It main purpose is to act as if you have a http server on your computer or it is virtual http server. Install it to C:\AppServe directory.
After you have install all the software above, its time to create a batch file. Open conText, choose File then New. Copy the following if you are using Windows XP (change the paths to suit your needs):@echo off
call C:\flex\bin\mxmlc.exe -compiler.debug %1
start C:\”Program Files”\”Mozilla Firefox”\firefox.exe “http://localhost/”%2.swf
Then save the file to C:\Flex\flexRun.bat . Let me explain what this file does. Call is use to call executable files, -complier.debug is use to debug and create mxml files to swf files, %1 is the first arguement from external source. Start is use to start a program, “http://localhost/” is your virtual http server, %2 is the second arguement, .swf is the file extension of flash.
You have all the software and a batch file in your system, its time to configue conText editor. Open conText editor if it isnt open, then go to Options, and click Environment Options. Under Execute Keys tab click add, type in mxml then ok. A tree like structure will appear, choose and click F9 and on the left side under Execute Textbox find the batch file you have created, in our example is C:\Flex\flexRun.bat, on the Parameter type in %n %F, check the Capture console output. Then click apply, then ok.
You have now completed configuring the software, its time to make your first Flex file. Open ConText, Go to File and New and copy the following code:
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” xmlns=”*”>
<mx:Label text=”Hello World” />
<mx:Button label=”This is a button” />
</mx:Application>
Save the file to the path where you install your appServe in our example C:\AppServe\www\helloWorld.mxml . After Saving press F9 and wait for the firefox to show. And Halla, your first Flex RIA is shown. Thanks to Faisal Raja, the webmaster of altlimit/network and other projects under the altlimit team.
Created by: Almond Joseph B. Mendoza.
Dated: May 18, 2006.












