I just uploaded the new tutorial that shows how to make some modifications to Flex Builder to make it into a lean, mean, ActionScript machine. I love TextMate because of the tab shortcuts and luckily there is a way to do something similar in Flex Builder. In this tutorial I show how to install a great snippets plugin and also talk about other ways to make Flex Builder more powerful for your ActionScript development.
Lee








Nice… Definitely need some reasons to use Flex Builder for ActionScript, when in OSX. FlashDevelop has me @ the moment, obviously when in Windows.
Keep em coming.
absolutely great, this is what I liked about fdt so much
http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html
Other way to use snippets. I think that this snippets plug-in more powerfull.
I use Eclipse Monkey(Monkey Script, http://aptana.com/docs/index.php/About_Eclipse_Monkey) in my projects
We started project about Eclipse Monkey(in russian
, but you can use google translate) http://code.google.com/p/monkey-for-flex/.
You can find some scrips and links to docs on this page.
What about the Snippets plugin for Eclipse (WST) ? You lose the shortcuts (or I was too dum to find it), but there you have parameters, which I think are missing in the CFML snippets tree view.
More info here:
http://www.insideria.com/2008/04/flex-builder-enhancements-snippets-and-todo.html
I’m having a bit of trouble getting the Insert Snippet to work in Windows. It installs perfectly, but when I set a keyboard shortcut, it won’t execute. Anyone else with similar problems?
Update on my last post – restarting Flex again (after the keyboard shortcut was enabled) got it working when in an ActionScript file. It still won’t work, though, when in an .mxml file. Is it intended to work when editing non class files, too?
Lee, that is so awesome! Do you think Adobe will ever roll Flex Builder into the Flash IDE, or vice versa? To me, that would be primo, because you’d have a fine visual editing app, and coding environment tabbed on the same application. Flex’s outline view is something I’ve desperately been wishing to see added to Flash, and snippets looks really great too.
Push someone’s button to make this stuff all in one app, and ready to go out of the box. It’s a hassle having to bounce between Dreamweaver, FlexBuilder, and Flash app’s, and setting up projects to work seamlessly between them is abit much more than it should be IMO. It’s the same when developing apps with Xcode, and Interface Builder, the plethora of windows floods your screen, and becomes arduous to navigate. Tabs make the people hot & ready to go.
The only problem I see with your solution is that you have to manually add the imports needed for your snippet.
@David Yes I have used that Snippets panel but the lack of keyboard support sucks. That’s the main reason I use a snippets panel.
@Brian Yes it does not work in an MXML file. Eclipse Monkey either.
@Simon Yes I know that is a pain.
I’ve still been using FlashDevelop on my Mac in a Windows VM. Mostly, it’s fine, though syntax checking doesn’t work. That’s kind of minor, though. I really like working in it, other than the cross platform matter.
Any of you out there used both? Is it worth buying Flex Builder to work natively on OS X? If so, is the Standard version good enough to do AS work that’s mostly for Flash?
Hi Lee
Thanks for this. I would however recommend this product: TextExpander.
The downside is that it’s Mac only, the plus side is that it’s integrated in the mac so that you could be coding in any program, such as Flash IDE, Flex Builder, Textmate or even textedit and it will work consistent across the board. It’s also easier to set up.
Well worth the little money it costs in my opinion.
http://www.smileonmymac.com/TextExpander/
few example of my shortcuts go as follow (%| is where the cursors ends up)
var` becomes:
private var something%|:String = ”;
try` becomes:
try {
%|
}
catch(e:Error) {
}
pub` becomes:
public function %|() :void
{
}
etc.
I think that Web Standard Tools have a better snippets tools.
You can see complete installation here
http://www.mega-art.com/blog/?p=39
fyi
David Zuckerman (one of the Flex Builder engineers) has a quickfix plugin:
http://davidzuckerman.com/adobe/2006/05/08/alpha-plugin-featuring-quick-fix-support-and-error-highlighting-in-flex-builder-2-beta-3-released/
that will automatically add the imports. It was built for Flex Builder 2, so I dont know if it still works with 3.
mike chambers
mesh@adobe.com
Hi Lee,
Excellent tutorial! Will there be any more on using Flash and Flex together? I would like to see one where you create a custom component in Flash (like a good flv player) and export it as a swc and use it in a Flex/Actionscript project.
Keep up the good work!!
Mark
Maybe, I’m just set in my ways. But I still find it hard to understand the true benefits of using Flex over Flash. I mean sure the IDE has a few nice features, but they tend to be things I’d rarely use.
It’s never bothered me that much to copy and paste from other classes.
And it always felt as if Flash was much more flexable (irony right there) when you want to create something.
I used Flex to build a back-end system and don’t get me wrong the components were really good and really handy, but outside of that. Why do all my Flash code in it.
Shaun
While you do have to manually import the classes you use in the snippets, you can just use a simple keyboard shortcut to do that. Command + Shift + O will auto import anything you haven’t imported already. To get to it in the menu go to Source -> Organize Imports.
@Lee, when trying to install CFEclipse, I get the following error:
Eclipse RCP Patch 2 for 3.3.1 (3.3.1.v20071204_331) requires feature “org.eclipse.rcp (3.3.1.R33x_r20070802-8y8eE8sEV3Fz0z0GlHJrXvTAUS)”.
Any idea, what may have caused this?
Man, this is awesome. Thanks for the post. I’ve been missing this feature since moving over to FB from Textmate.
I just thought I would show an alternative that I use and I find it very helpful. It is called text expander and it is only for a mac.
http://www.smileonmymac.com/TextExpander/
It costs $29.99, but it has a trial that (appears) to not expire. The best part is that it works outside of the flex program too.
anyone, tipps to make code completion, help or trigger text with snip tree view work. flex builder 3.
The KeyBoard ShortCuts Doesn’t works in Windows
Anyone have this problem?
This doesn’t appear to work on Windows in FB 3.0.214193. Restarting FB didn’t make any different. When I use the keyboard shortcut, it just puts a line break. It doesn’t seem to matter what keyboard combination I set up. It always does the same thing.
Any ideas?
Thanks for this tutorial.
I’m using Flex 3 purely for AS3 with Flash CS4 and would like better understand the integration in regards to nested Symbols. I’m trying to use Flash for it’s layout strengths and reference these objects from my DocumentClass AS3 code, but I’m having trouble when there are nested movie clips. I keep getting:
ReferenceError: Error #1056: Cannot create property con on DocumentClass.
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at DocumentClass()
I had everything working fine until I inserted a new top level MovieClip (con) under which everything else now exists. I just added:
public var con:MovieClip;
to my DocumentClass after making my new enclosing MovieClip symbol, which I am exporting for AS3.
There are obviously some gotchas that have gotten me.. Any help appreciated..
One last thing, for Shawn who asked, why not just use the Flash editor:
Perform an “apply comment” and when you get the resulting “//” at the position of the cursor, rather than at the beginning of the line where it belongs, you should begin to conclude that this editor was not created or tested by programmers. Try doing an undo without the shortcut key..
Hello,
for me in FB 3.2 insert snippet does not work. Any idea?
hey,
same problem here. Nothing happens when i hit the key …
I concur – Snippets doesn’t work in Windows Flexbuilder 3.02.
Everything looks OK, but the key bindings just don’t trigger the snippet. The binding also doesn’t show up in the message bar at the bottom of the window as it does for others …