After reading about Flex 2, I wanted to give it a try for myself. Adobe provides a free command-line compiler in the Flex SDK, downloadable with registration from their surprisingly clunky web site.
The download is just a zip file that you can extract and immediately begin using. Within a few minutes I was able to compile and test the sample applications, and from there it wasn't too hard to figure out the minimum setup I needed to create my own first application:
- Create an empty directory under the document root of your web server.
- Copy
samples/explorer/AC_OETags.jsto the new directory. - Copy
samples/explorer/explorer.htmlto the new directory. Rename itfirst.html - Edit
first.htmland replace all instances ofexplorerwithfirst - Copy
samples/explorer/build.shto the new directory. - Edit
build.shand change to the relative path tomxmlcso it points to wherever you extracted the SDK.
Once that was done, I created a new main layout file named first.mxml to declare my application:
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> </mx:Application>
I used mxmlc to compile this into first.swf. I was then able to view first.html in a browser and successfully access my first (empty) Flex application.
No comments:
Post a Comment