Learning flex without spending $0.01, day one.

I downloaded the command-line compiler and lots of documentation PDF files from here earlier today.

Then I started working through the “getting started” tutorial PDF.

I made a few edits to my ~/_vimrc file so that working with mxml files would be a little easier:

” Do some specific maps for flex files (.mxml files).
” F10 rebuilds the swf.
autocmd BufNewFile,BufRead *.mxml map <F10> :! mxmlc %<CR>

” F11 executes the swf.
autocmd BufNewFile,BufRead *.mxml map <F11> :! start %<.swf<CR>

And I was able to build this do-nothing widget after about 15 minutes of goofing off:

flex1

That’s a screenshot of my homemade swf running above the vim session where I wrote it.

Next stuff to figure out:

  • Where do my trace statements go?
  • I need to figure out how to pass in locations of actionscript files when I compile my mxml files into swf files.
  • I need to learn the tags in MXML. They’re different than HTML.
  • I need to learn how to talk to a webserver.

One thought on “Learning flex without spending $0.01, day one.

  1. Your trace statements end up in a file usually called, “flashlog.txt”. I say usually because the location and name of the file can be changed inside the mm.cfg file. Another option is to map (or add) a call to the flex debugger (fdb). Mine looks like this:

    autocmd BufRead,BufNewFile *.as map :!mxmlc –debug % && fdb %

    The key is making sure you’re compiling with ‘–debug’. This will fire up the debugger where you’ll be asked to insert breakpoints and so on. Just type ‘c’ (continue) and the swf will start, dumping trace statement to the console.

    The mxml compiler source path (and many other options) can be changed in your flex_sdk_dir/frameworks/flex-config.xml file. Normally, it’ll search in the current directory and then go check out flex_sdk_dir/frameworks/source.

    Finally, for more information on connectivity, check out: http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001123.html

Comments are closed.