Flex 3 SDK: First Steps
This post will guide you to install Flex SDK 3.4 on Windows XP and compile and run the examples on it. We’ll be using the command line, a text editor. No Flex Builder.
Step 1:
Download Flex SDK 3.4 to your computer.
Step 2:
Extract to c:\flex_sdk_3.4
Step 3:
Browse to C:\flex_sdk_3.4\runtimes\player\10\win and run:
Install Flash Player 10 ActiveX.exe
Install Flash Player 10 Plugin.exe
Step 4:
Browse to C:\flex_sdk_3.4\samples\explorer
Step 5:
Run build.bat
This will take a while because it will recursively compile all mxml files.
Step 6:
Run explorer.html
Experiment with the samples provided.
Step 7:
Let’s create an hello world application. Using an editor of your choice create a text file and save it as “helloworld.mxml” – the directory doesn’t really matter but let’s say c:\helloworld\.
Step 8:
Copy the following xml text into the helloworld.mxml file.
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com /2006/mxml”>
<mx:HBox>
<mx:Label text=”Hello World from Flex!”/>
</mx:HBox>
</mx:Application>
Step 9:
Compile your mxml file into an swf file using the following command at the command prompt:
C:\flex_sdk_3.4\bin\mxmlc.exe helloworld.mxml
Step 10:
Run your swf file. The Flash player should open and execute your file. Your “Hello World from Flex” message will show up.
References: