Archive for April, 2010

Accessing ActionScript and Flex SDK Reference Offline

You can cache content locally using Adobe Help. From Flash Builder, go to Help > Flash Builder Help.

  1. In Adobe Help
    (a.k.a, Adobe Community Help Client), go to Preferences
  2. Select
    Download Preferences, make sure Flex 4 is checked. Select Flex 4 and select the help package for “ActionScript 3.0 Language and Component Reference” and any additional packages you wish to download. The full set of Flex 4 help packages is currently around 70 MB. 
  3. Select Local
    Content, update all packages if an update is available.

With the content cached, you can access offline help.
Make sure you select “Flex 4″ in the search box, “Local Help” for your Search Location and
“ActionScript 3.0 Language and Component Reference” for your Filter Results. Despite the name, this will include both built-in Flash and Flex APIs in the search results.

If you only want reference information about Flash
Builder (not including Flex or Flash ASDoc), you can download this PDF http://help.adobe.com/en_US/flashbuilder/using/flashbuilder_4_help.pdf or simply follow the same steps to cache “Using Adobe Flash Builder 4″. 

It’s important to note that Flash Builder 4 no longer uses Eclipse’s help system to deliver help content.

Share on Facebook

Build SWCs with ASDoc for Flash Builder 4

You might already know that ASDoc support was added in Flash Builder 4. We show ASDoc content in code hints, hovers and in the new ASDoc view. We have built-in support for showing ASDoc content from:
  • Flex 4 SDK
  • playerglobal.swc and airglobal.swc
  • Referenced library projects in the current workspace
  • ASDoc content in your current project
However, what we don’t provide is a way to distribute SWCs that bundle ASDoc content without distributing your source code.
Gaurav wrote a great blog post going into detail on how the SDK uses Ant to include ASDoc using framework.swc as an example. You should be aware that te SDK bundles ASDoc a little differently in order to create local-specific resource bundles that contain local-specific ASDoc content. What that means for our users is that ASDoc content in Flash Builder is localized.
For most library developers that don’t require localizing their documentation, the process is a lot easier.

I’ve put together an example library project that you can download that contains a simple Ant script you can use for your own projects. Instead of creating a separate resource bundle, this script essentially runs the ASDoc tool, unzips your SWC, then bundles the ASDoc DITA files into the SWC.

Download: ExampleFatSWC.zip

In Flash Builder:
  1. File > Import, Flash Builder > Flash Builder Project
  2. Browse to the ZIP file
  3. Finish
  4. Right click on the build.xml file and choose Run As > Ant Build
  5. The “fat” SWC is in your /bin folder ready to be shared
When your users add the SWC to their project library path, they’ll see ASDoc content without any extra work.
Remember, to run Ant within Flash Builder, you’ll need to download the Eclipse Java Development Tools from the appropriate update site. For Eclipse 3.5 or Flash Builder Standalone users, use http://download.eclipse.org/releases/galileo and look for “Eclispe Java Development Tools”.
Share on Facebook

New and Updated Keyboard Shortcuts

Posts about Eclipse or Flex Builder 3 keyboard shortcuts are pretty easy to find. Here’s some inside info on keyboard shortcuts that are new and/or updated in Flash Builder 4. As usual, replace CTRL with CMD on Mac.

  • Updated CTRL + SHIFT + G, Find All References
    Find all references to the selected identifier. Works in ActionScript and MXML editors. In FB4, the shortcut now works from files in the Package Explorer.
  • Updated CTRL + SHIFT + T, Open Type
    Opens the Open Type dialog to quickly find classes and interfaces in the current project. In FB4, the shortcut now works when the Package Explorer is the active view.
  • Updated CTRL + SHIFT + O, Organize Imports
    Sorts imports and removes unused imports. In FB4, this shortcut now organizes imports in MXML Script blocks.
  • New CTRL + \ and CTRL + SHIFT + \, Next and Previous State
    Flex 4 states visualization in the MXML editor is new in FB4. These actions are also in the navigate menu. This allows you to gray-out code that isn’t in a particular state. See my article on the Flex Developer Center for more information.
  • New CTRL + I, Correct Indentation
    When writing code indentation is applied automatically after a newline. When pasting code, indentation is automatically corrected. However, there are some cases where indentation isn’t right (e.g. a downloaded file) and you want to fix it manually. You can press CTRL + I to correct indentation on the current line or if you have a text selection, indentation will be fixed for all the lines selected.
  • New CTRL + ALT + H, Call Hierarchy (exception, this is not CMD on Mac)
    Opens the Call Hierarchy view. Displays all functions that call and/or reference the selected identifier.
  • CTRL + 3, Quick Access
    Quick Access is by far the most useful Eclipse shortcut. It displays a pop-up dialog that allows you to search all available commands in the current context. If you don’t know if a command exists, or if it’s buried deep in a preference page, use Quick Access to find it. For example, if you type “sdk” you can jump to the Installed Flex SDKs preference page. If you type “asdoc”, you can quickly activate the ASDoc view.
Share on Facebook

How to Get Help With Flash Builder

Here are a few different ways to get your Flash Builder questions answered. Vaguely in order from most to least helpful:

  1. Adobe Forums: Flex Forum – http://forums.adobe.com/community/flex/flex_general_discussion
    There are lots of helpful people here willing to direct you to an answer or even work with you to find one. There are community members, moderators and Flex and Flash Builder team members regularly answering questions.
  2. Bug Database – http://bugs.adobe.com/flex/ (a.k.a. JIRA)
    Filing, voting and commenting on bugs is one of the more direct ways to get noticed. It’s also really easy to find existing bugs and watch them for e-mail updates when there’s a status or comment change. If you have an issue that hasn’t been fixed yet, vote for the bug and add any new/relevant information that you have. Voting doesn’t always translate to a fix or a new feature, but it doesn’t hurt to make your voice heard for the record.
  3. Tech Notes – http://kb2.adobe.com/cps/832/cpsid_83246.html
  4. Release Notes – http://kb2.adobe.com/cps/530/cpsid_53079.html
  5. This blog
  6. Twitter
    We don’t all monitor Twitter during our workday but once in a while we do filter the noise and find some legitimate issues. I typically link to my blog from my Twitter account, jasonsj_adobe.
Share on Facebook