Missing Menu Options in Flash Builder

by David Salahi on August 30, 2010

I encountered a mystery surrounding several missing menu options in one of my Flash Builder workspaces recently. I wanted to create a new skin for a List control so I right-clicked on my skins folder and looked for the New MXML Skin option. And I looked. And I looked some more. But it wasn’t there.

I happened to have another copy of Flash Builder open in another workspace so I gave it a try in that project. Sure enough, the New MXML Skin option was there along with a couple of other options that were missing in the first workspace. Here’s a list of the menu options missing from the File –> New menu in this workspace:

  • Flash Professional Project
  • MXML Item Renderer
  • MXML Skin

I’m not sure why those menu options went missing but I was able to work around it by recreating the workspace. I simply created a new workspace, copied all of the projects into the new workspace folder and then imported all of my projects into the new folder. I then had a full set of menu items.

I poked around a bit trying to figure out what went wrong but wasn’t able to find a conclusive answer. My best guess is that it has something to do with the fact that I was previously running the Flex 4 beta and that’s when I created the workspace with the problem. I compared the workspace .metadata folder and, curiously, there were 25 folders inside the .plugins folder for the problem workspace but only 12 for the newly created one.

{ 0 comments }

Flex 4 Spark RadioButtonSkin Dissected

by David Salahi on August 27, 2010

The Flash plugin is required to view this object.

Right-click to View Source

When I first started trying to skin a radio button I was stumped for a little while because there are so many elements in the skin. It was difficult to tell what each one did and making modifications sometimes resulted in no apparent change. In some cases, this was because I was using a skin containing ActionScript styling. Skins with ActionScript styling can override values set in the skin’s MXML. Until I figured that out I was pretty confused.

However, in other cases, the lack of any visible change was due to the subtlety of the features. For example, the alpha value for the stroke surrounding the circle is 0.011 at its top and 0.121 at its bottom. With that much transparency any change in a 1-pixel stroke is real tough to see. In another case, the change between the color of a fill in the over state (0xBBBDBD) and the down state (0xAAAAAA) is barely perceptible.

The Visible RadioButtonSkin

So, I’ve created a skin called RadioButtonSkinDissected in which I’ve increased the size of many of the features so that they will be easily visible. And I’ve changed the colors to make elements and state changes quite obvious. Also, there is no ActionScript styling code to confuse matters. With so many elements it may still be difficult to see which is which. But now, if you make changes it will be much easier to see the change.

The skin elements in the standard Flex 4 Spark RadioButtonSkin are:

  1. Drop shadow
  2. (Unselected) fill
  3. Fill highlight
  4. "layer 6: highlight stroke"
  5. Border
  6. Dot
  7. Label

In some cases, I’ve retained a copy of the original Flex SDK code, commented out, for comparison. Also, most of my comments have my initials (DLS) so you can distinguish between my comments and the original Flex 4 SDK skin comments.

If you can’t see what any given element is doing right away just change its color or turn it off. At this size, the change should be pretty clear, particularly if you take before and after screen shots. Hopefully, this will help you when creating your own RadioButtonSkin.

Download the Flex 4 project (.fxp)

{ 0 comments }

Flex 4 Skin with ItemRenderer for a Spark List Control

August 25, 2010

This is an example of a Flex 4 skin which provides a Spark List control with a completely customized appearance. This example has a border with rounded corners, a custom background color and different colors chosen for the rollover and selected colors. A custom ItemRenderer was included in order to get the desired rollover & [...]

Read the full article →

Book Review: Hello! Flex 4 by Peter Armstrong

August 18, 2010

Hello! Flex 4 is written for experienced developers who are new to Flex, in general, or Flex 4 in particular. It’s organized as a series of 26 independent hands-on tutorials ("sessions"). Its scope is limited but could be a good introduction to Flex. As is the norm for code-oriented technical books these days the book’s [...]

Read the full article →

Missing flashlog.txt Output from Flash Builder

August 5, 2010

I’ve been grappling with a mystery lately regarding the failure of my flashlog.txt file. As you may know, you can direct all your Flash Pro or Flash Builder trace output to also go to this file by setting a couple of flags in mm.cfg. I had made those settings but I wasn’t getting anything in [...]

Read the full article →

Flex 4 Vertical Sliding Menu, Part II

July 30, 2010

This is a follow-up to my post Flex 4 Vertical Sliding menu and shows two ways to highlight the currently active menu item. The first method is simpler and relies on keeping a reference to the current menu item in a member variable: protected var _currentMenuItem:Label = null; A new function is added to do [...]

Read the full article →

Flex 4 Vertical Sliding Menu

July 28, 2010

Right-click to view source. Here’s a Flex 4 menu component that you can modify with your own menu items and plug in to any application. The menu items are Labels; clicking on one triggers an event which you can handle in the container or elsewhere in your application. This sample menu includes two submenus which [...]

Read the full article →

Book Review: Adobe Flex 4 Training from the Source

July 21, 2010

Adobe Flex 4 Training from the Source, Volume 1, an Adobe http://flexperiential.com/wp-admin/post-new.phpPress release, is an outstanding resource for getting up to speed on the Adobe Flex 4 SDK and the Flash Builder 4 IDE. Most technical books take a sort of catalog approach to presenting their material. That is, each chapter discusses a specific set [...]

Read the full article →

Missing Flex 4.1 SDK — Found

July 9, 2010

I read RJ Owen’s blog post on the Flex 4.1/Flash Builder 4.0.1 releases so I decided to check my installation to see if was up to date. First, I tried the Help –> Search for Flash Builder Updates option in Flash Builder and it told me that Flash Builder itself was already up to date. [...]

Read the full article →

Flex 4 ActionScript 3 Lightbox for Flash Player

June 27, 2010

Here’s a class that duplicates the popular JavaScript lightbox effect entirely in ActionScript 3 for Flex 4 projects. Here’s a demo of the Lightbox class in action. Right-click to view source or download the fxp at the end of this post. (Note: it takes a few seconds after loading this page for all the images [...]

Read the full article →