Branching Experiment: Ink Test

Continuing to play with my AS3 branching library. Focusing on texture and style, rather than the structure of the branching right now. This is an attempt to mimic ink on paper with bleed, fade, spatters, and “wiggle”, while keeping runtime performance acceptable. I’ll probably keep tweaking for a bit, then re-envision the logic for tree drawing that I used in my Sakura experiments.

Continue reading →

Spelling Plus Library 1.1 Released for Flash, Flex, AIR

Today we’re releasing version 1.1 of our spell checking engine for ActionScript 3. Version 1.0 of Spelling Plus Library has been available for three months, and has been well received, with very positive feedback from our users. Amazingly we’ve only had a single bug report, and that turned out to be an issue with the Flex framework, rather than our code.

We have had a couple of feature requests, and came up with a few ideas of our own, which version 1.1 of the component addresses. Specific additions include:

  1. ability to turn off spell checking for the currently selected word (ie. so that it doesn’t flag a word as misspelled while you are still typing it).

  2. automatically enable/disable spellchecking on a target text field when it is focused / unfocused.

  3. better integration with Flex data binding.

We’re very committed to maintaining Spelling Plus Library as the best of breed spell checker library for Actionscript (Flash, Flex, AIR). It’s kind of nice to be able to provide support directly, unlike all of our previous components (ex. glic/mCOM and the Flash CS3 components). It means we can ensure the support experience for our users is as exceptional as the code behind the component.

You can visit the Spelling Plus Library product page for demos and more information.

Existing users: SPL 1.1 is a free release, expect your upgrade information within the next day.

ProximityManager updated for AS3

A few years ago, I released an AS2 version of ProximityManager class, which allows you to efficiently track the proximity of large numbers of sprites. You can read a full description of the approach and uses here.

In the last month a couple of people have left comments indicating that they were having difficulty porting it to AS3. This prompted me to port it and do some significant optimizations. The new class runs a lot faster than the original, and is worth taking a quick look at in comparison with the AS2 version even if you don’t use it in a project.

Optimizations:

  1. removed two-dimensional arrays (which are very inefficient, especially in AS3) in favor of using a single array using an aggregate x/y index. The aggregate index is assembled with bit operators to make it even more efficient.
  2. added a simple caching mechanism, so that subsequent calls to getNeighbor for the same grid position do not need to recalculate the results
  3. used a Dictionary instance to hold managed items, which makes it much more efficient to remove objects on the fly.
  4. took full advantage of types and casting
  5. other minor tweaks

Note that these optimizations impose a limit of +/- 1024 rows and columns on the ProximityManager. This shouldn’t be an issue though: even with a gridSize of only 25 pixels, you would still have an area of 51200 pixels wide and high to work with.

Continue reading →

Adobe Exchange: Worth a Look.

While I was vaguely aware of the Adobe Exchange, I hadn’t really checked it out until a recent purchaser of our Spelling Plus Library mentioned that he had been unable to find our component on it. While the Exchange is still in beta, and has some rough edges, it’s looking pretty good overall. I was able to submit SPL, and have it moderated and listed in under 48 hours.

I think one of the major weaknesses of the Flash platform is the lack of a strong component and source code ecosystem. The Exchange provides one of the key elements needed to grow this ecosystem: Providing a central location for finding and rating third party components.

Continue reading →

DiggTop AIR Application Updated

This week, our first public AIR application, DiggTop, surpassed the 10, 000 download mark, thank-you to all who have downloaded it!

We initially announced DiggTop back in April, Flex + Apollo + Digg API = DiggTop!, for the then brand new Digg API. We had hoped to have many new versions and features out by now, but due to our internal work load, free products like DiggTop suffer (an all too common story). But fear not! We have not forgotten about this project and still have great new features planned for (hopefully) the near future. We will also be updating it to match any future builds of AIR. So stay tuned, as our little AIR application will keep wasting your time well into the future.

**Note: Digg has recently updated their api, so any current builds of DiggTop will not work anymore. We apologize for any inconvenience this has caused. This build resolves that issue, and adds a new images section to match the Digg.com site.

ColorMatrix Class in AS3

Something I’ve been meaning to do for a while now is port our ColorMatrix class to AS3. It’s a fairly simple conversion, but is still a handy utility to have on hand.

If you haven’t used the ColorMatrix class before, here is the description from when we first released it in 2005:

ColorMatrix provides a way to adjust Brightness, Contrast, Saturation and Hue based on a range of numeric values as well as multiply matrices. The ColorMatrix can then be passed into ColorMatrixFilter to apply color adjustments. The added bonus of ColorMatrix is that it uses the same calculations to generate matrix values as the Flash 8 IDE (with the exception of contrast adjustment which uses linear interpolation to provide a bit more granularity).

Download the updated source here

Here is a quick sample of it in use. This demo is included in the download package.

Continue reading →

CS3 Component bug: Component Styles

I was reminded a few weeks ago by Phil Chung (of philterdesign fame) of a bug in the CS3 component framework which we encountered shortly after CS3 was released.

Basically it boils down to setting component-level styles before any components of that type have been created. The styles are created, but when the first component of that type is instantiated, it resets the component styles, and overwrites the changes that were made beforehand. Slap a button in the library of a new FLA, and add the following code:

import fl.controls.Button;
import fl.managers.StyleManager;
var tf:TextFormat = new TextFormat();
tf.color = 0xff0000;
StyleManager.setComponentStyle(Button, "textFormat", tf);
var b:Button = new Button();
addChild(b);

There is an easy workaround, which is to make sure you set component styles *after* a component of that type has been instantiated. You can also just create a dummy instance of the component, and destroy it (which properly creates the style definition) and eliminate the issue.

You can download this fix here. One thing to note is that the components do not compile based on the component source code that is included with CS3, but rather the compiled componentShim component included in each component. To use this updated class, drop it in the appropriate directory (fl/managers) relative to your project, or in any path that is part of your publish class paths. The components will prefer any class definition found locally over the componentShim.
Please note that this is not officially supported by Adobe, and we take no responsibility for its use.

So there you have it. I imagine at some point, an updated release of the components will solve this and other issues, but until then at least this issue is resolved.