Posts in Category "flex"

Flex4 Dotted “Line”

Quickly, I wanted to share some code around creating the elusive ‘dotted line’ in Flex4.

The end goal is a divider made up of 1px dots, like this:
dotted line example

My solutions isn’t a true line, in that you can’t you can’t draw it on a diagonal. However, if you need a 1px horizontal divider, here you go. This is simply a Rect with a bitmap fill, using a dot as the bitmap. The bitmap is actually 1 pixel by 2 pixels, with the right pixel colored (#808080) and the left transparent, as such:

example of the dot png

Here’s the code that would draw your “line”:

<s:Rect width="500" height="1">
<s:BitmapFill source="@Embed('/assets/images/dot.png')" fillMode="repeat"/>

That’s about it. You can download the dot PNG here. Or, just make your own in Fireworks.

Coming Soon: Cairngorm 3

With MAX right around the corner, you would expect some build up. For example, Cairngorm 3. Yes, kids, it’s true! A transformation is coming, which will make Cairngorm more than just a micro-architecture. Instead, Cairngorm is broadening its scope to become a collection of tools, practices, and libraries, all of which form a foundation for use in Flex development. At the core of it, Cairngorm still represents a layered architecture, separation of concerns, and test driven development. If it suits your needs, the original Cairngorm libraries are included, with many enhancements. On top of that, a wealth of additional information is added. This content is gleaned from the expertise of Adobe Professional Services and the Cairngorm Committee. This will allow the wider community to share the knowledge that we in Adobe Professional Services have acquired while developing large scale Flex applications. The additional components and recommendations expand beyond a single architecture, and will suit many of the frameworks now being used. This will broaden Cairngorm’s scope, making it a useful tool on any size project.
As to what ‘coming soon’ means, I’ll have to leave that up to your imagination. But when it does become officially available, be sure to check it out!

Squiggly Now Available on Labs

So, you need a spell checker? Finding the current options are either a bit limited, or not free? Adobe has just launched Squiggly, a spellchecker library based on an open source algorithm and dictionaries, as a project on Labs. With Squiggly, you can add ‘check as you type’ spelling to your AIR or ActionScript application with easy to follow examples. It’s a ‘technology preview’ at this point, and only targeted at English for now, but still worth checking out.
Read the official Labs blog entry, or check out the online demo.

Shift + F2 vs. AS3LR

If you’re smart enough to be developing in ActionScript, you’re also probably smart enough that you have figured out a way to bookmark the ActionScript Livedocs. However, there always seems to be reason to try access the docs at a time when finding your bookmark is a hassle. For me, that usually happens during peer programming. When I’m working at another person’s machine, they don’t usually have things set up just as I would, and finding an entry point for the current docs can be a little frustrating.
First, if you’re using FlashBuilder (or FlexBuilder), you can always use the ‘Shift + F2’ shortcut. This is mapped to ‘Go To Documentation’ in the ‘ General > Keys’ section of the FB preferences. This opens the Language Reference in the context the Eclipse help viewer.
Since I don’t like having the help viewer clutter the documents, I tend to go straight to a browser and punch in a URL. Fortunately, there is a handy link that automagically resloves to LiveDocs for the current Flex Language Reference.
I don’t know for certain, but AS4LR seems likely once Gumbo is out of beta. For now, the AS3 Docs offer a link to the AS4 docs should you need it.

Tour de Flex

While at MAX, I learned about the ‘Tour de Flex’ website. I’m excited about the resources that are offered at, but the Tour de Flex tool is especially focused and useful.
First, the site allows you to download the Tour de Flex AIR app. This is a tool similar to the Adobe Flex 3 Component Explorer. The Tour de Flex version is expanded, with 200 component examples, covering core components, data access, data visualization, mapping. and many others. Because it is an AIR app, the tool can also demo components and language features only available in AIR. There is also a listing of custom components, effects, skins, and other content created by the community.
One of the features I’m most excited about is the listing of Cloud APIs
A few clicks brings up example code for a bunch of online APIs. Viewing how to get started with Ebay, Amazon, or Google Maps is a great way to help an idea get off the ground. Even better, there’s examples for some of the services that Adobe offers, like and Way cool.
The tool also includes a download option, which creates a zip of the source code for the example you choose to download.
Another great feature is the Tour de Flex plugin for Eclipse. With this installed, you can browse the 200 examples from within your IDE. Having an example to look at often makes it easier to implement a component you haven’t used before, or one you haven’t used in a while. With this, there’s no need to go looking around on the web for example code.
Check out the Tour de Flex page for more detail.