Flex/Flash/Actionscript

Docking ToolBar from Adobe Flex Team added to FlexLib

The Docking ToolBar component that was released by the Adobe Flex Team has been contributed to FlexLib. This component was originally released on Adobe Exchange. The description from the Flex team:

The docking toolbar component collectively helps managing toolbars in an application.

The toolbars can be docked to the top or bottom edges or kept floating within application area. The contents within a toolbar use a flow based layout approach.

A big thank you goes to Matt Chotin at Adobe for supporting the FlexLib project and getting this contribution into the library.

Future updates to the DockingToolBar will be found in the FlexLib project, and bugs and feature requests should be logged here.

Here’s a sample showing off the Docking ToolBar component:

This movie requires Flash Player 9.

Standard
Flex/Flash/Actionscript

List control for the one-armed man – take two

Here’s my second attempt at making a List control for Flex that has the functionality of using the Control and Shift keys, but without making the user actually press the Control or Shift keys. For those poor programmers who have been crippled by RSI, now you can at least drag around list data with your one good hand.

This version is much better than the previous version. Now you click on an item and drag to select multiple items. You can still drag and drop items from one list to another. The only difference is that you must first select the items, then click and drag to move items to the other list. Control-click functionality is the default if you only click one item. If you drag to select items and try to select below the visible items it will scroll the list into view.

Here’s the source.

This movie requires Flash Player 9.

Standard
Uncategorized

I joined Qwitter – you should too!

qwitter

Last week marked the end of my employment at Stanford University. It’s been a great 4 years (wow, 4 years?!). The project I’ve been working on has reached a point where I can comfortably step away. This is completely voluntary, and I’m leaving on good terms with everyone at Stanford.

qwitter badge

So as of this moment I’m unemployed. I highly recommend it. I’m not looking for new work for a while. For the next 4 months or so I’ll be traveling and doing a little Flex contracting work. I’m going to try to focus on blogging a bit more, so hopefully I can start posting more frequently. My travel plans are still taking shape, but include some combination of the following:

  1. Sailing along the coast of Central America to Panama. For a few weeks in April I’ll be sailing with my dad, who is currently sailing alone from California to England via the Panama Canal (yes, he is amazingly badass). I’m going to meet up with him somewhere along the way, maybe El Salvador, and sail for a few weeks to Panama.
  2. A few east coast trips. I’ve got friends on the east coast I haven’t visited enough, so I’ll be making a few trips. I’ll be vacationing with my girlfriend in Cape Cod, and I also might make separate trips to DC or NY.
  3. Sasquatch music festival at the Gorge Amphitheatre in Washington state.
  4. An as-yet-undecided European-ish destination. Maybe Turkey, Greece, eastern Europe… this is pretty up in the air, we’ll see if it actually happens.
  5. Denmark for the best rock festival ever, Roskilde.

During and between traveling I’ll be playing with Flex stuff and blogging. I’ll be back home and doing contracting work for most of May. I’ll get back to real life around mid July or August, at which point I’ll be figuring out my employment situation. I am not looking for a job until then.

For now it’s time to enjoy life without worrying about paychecks and early-morning commuting. To celebrate I gave myself this sweet mohawk:

mohawk

Standard
Flex/Flash/Actionscript

List control for the one-armed man

This is a little experiment to play with a different method of selecting items in a Flex List control. It allows you to re-create some of the multiple selection options you usually get by holding down the control or shift keys while you select items. But now you don’t need to hold down the control or shift keys. Just play with it to see what I mean, it’s hard to explain.

There was a question on flexcoders that was about something like this. I’m not sure if this little experiment solved the right problem for the original poster, but trying to figure out how to get some of the functionality of using the control and shift keys without using the actual keys was kind of interesting (what can I say… item renderers and list controls turn me on). So this is what I came up with. Another thing to note is that the checkbox acts as a visual indicator only, it is not actually a clickable control.

View the source here.

This movie requires Flash Player 9.

Standard
Flex/Flash/Actionscript

Updated MXNA RSS Reader Flex App – Now With Source

Here’s the newest version of the MXNA RSS Reader Flex application that was shown at 360Flex. It’s been updated and another Flex community component was added into the mix. And full source is published. I call it ZOMGZ!!1 RSS Reader.

The updated recipe is:

So what’s new?
I added the sticky tooltip component by Maikel Sibbald, which shows the description of the article when you hover your mouse over it. I think it looks sweet. There’s a new icon for the most popular posts of the day. There’s also an options panel (click the rightmost icon). You can configure how many posts you want to read for each category. And you can choose to use the “Smart Categories” or the regular categories that MXNA offers (not all categories have smart categories that correspond). Those options are stored in a shared object, so next time you load the app it will remember your settings. And it will automatically load the last category you were browsing. I utilized a better method for sizing the font in the TreeMap that I didn’t realize Josh had included in the component. It looks a lot better now. I had to make a small modification to the component to get it work with embedded fonts, but now the fonts looks silky smooth and they show up in the reflection. I made some performance enhancements, turns out that drawing that reflection when you’re using embedded fonts really eats up processing power.

Future development
I’ve been working on getting the source to an acceptable point to release it to the wild. I didn’t get all this code to a point I’m truly happy with, a lot of it’s uncommented, but my ADD is kicking in and I’m tired of working on it, so here it is as it is. Use it to learn, use it for inspiration, use it for whatever. The only restriction is that Josh’s TreeMap is licensed under the GPL license (AFAIK the other stuff is MIT-ish license). I dropped this into an Apollo app and it kind of makes a cool desktop RSS app, but I didn’t add anything that really makes it any better than the web version, so I’m not going to release the Apollo version. I’m not planning on working on it anymore. I’ll be working on a few other RSS visualization apps.

ZOMGZ!!1

So check out the example below. View the source here.

[Or launch it in it’s own window: here’s the link]

This movie requires Flash Player 9.

Standard
Flex/Flash/Actionscript

Fire component added to FlexLib

I added a new Fire component to the FlexLib library. This is a Flex component that creates a fire or smoke effect. It can be customized in a variety of ways, including setting multiple colors for the flame. Check out the demo app below to see a few different presets I came up with. Try playing around with the different controls and you’ll get an idea of the different kinds of effects that are possible.

The key to this is using the perlinNoise function of the BitmapData class, and the DisplacementMapFilter. I don’t claim to be an expert on using these functions. Others have written about using them, I just copied the same approach.

View the documentation
View the example in a new window.

To get the source of the Fire component, download the FlexLib project from Google code.

And don’t complain about this using a lot of CPU horsepower, go get a faster machine 😛 Or look at the source and figure out how to optimize it for better performance and contribute the improvements back to FlexLib.

This movie requires Flash Player 9.

Oh, and for anyone wondering, I’ll be releasing the source for the RSS reader that was shown at 360Flex… soon. Probably tomorrow. And it’s an even more pimped out version.

Standard
Uncategorized

Pulled the trigger and bought a Mac – now where to buy RAM?

Thanks for everyone’s input today about what Mac laptop to get. Here’s what I ended up getting:

MacBook Pro 15.4″
2.16 GHz, 1 GB RAM, 120 GB Hard Disk, 128 MB graphics card


After people pointed out some good reasons to go for the Pro, the decision was then about the higher-end version or not. The benefits of the more expensive version would have been a faster processor (2.33 vs 2.16) and a 256 MB graphics card. The faster processor didn’t seem worth the extra price. The extra graphics RAM was more tempting, I don’t know, maybe I should have gone with that instead. As someone pointed out, the upcoming CS3 release from Adobe is going to have more intense graphics requirements, which was one reason to go for the Pro vs. non-Pro. Maybe once I get CS3 I’ll have wished I went with the 256 MB graphics RAM. But I figure I’m gonna drop 3 GB of RAM in there, so I should be able to run whatever the hell I want without problems.

So one more question for people out there: where should I buy a single 2 GB stick of RAM for a MacBook Pro Core 2 Duo?



Someone pointed out macsales.com, and I was checking out the different options. There are three different options I could go with. I’m not a RAM expert, so I have no idea what the benefits and drawbacks for any of these choices are. Here are the choices:

  1. $260 – Other World Computing Brand
  2. $340 – Micron
  3. $450 – Samsung

Crucial’s got a 2 GB stick for $355.

They all look exactly the same to me. The only difference I can spot is that the Micron option says it’s “128 x 8” versus the other two are “256 x 64”. I have no clue what this means. Is there any reason to not go with the cheapest option?

I’m going to be using the 1 GB stick of RAM that comes from Apple and just adding the new 2 GB stick I buy. Is there any brand that would play better with the 1 GB stick from Apple?

Standard
Uncategorized

About to buy my first MacBook, any thoughts?

MacBook Pro

MacBook Black

I’m about to pop my Mac cherry. It’s time for an upgrade from my old Toshiba Portege m200 tablet that I’ve had for about 3 years. I’m trying to decide whether to go with the Pro or non-Pro version of the MacBook, weighing the pros and cons of each. This is yet another case of a long-time Windows user switching to a Mac. The last Apple computer I had was an Apple II E. For a variety of reasons I’m switching, but the Paralells virtualization software is a driving force that got me to actually make the decision.

Size
I like a small laptop. I have a 24 inch widescreen monitor on my desk, which I use most of the time if I’m working at home. Over the past few years I’ve come to really appreciate the small form factor of my current laptop. It’s a 12-inch display and it’s light (just over 4 pounds). That 12-inch display packs a 1400 x 1050 resolution, so that’s sweet for a laptop that small. Part of the reason I really value the small size is that for the past 2 and a half years I’ve been commuting an hour each way via train to work every day. I often work on the train, so being able to easily carry around my laptop and pull it out without breaking a sweat has been important to me. That said, I’m not going to be commuting any longer, so maybe the small lightweight aspect isn’t as important to me anymore.

In terms of MacBooks, I’m deciding between the 13-inch MacBook and the 15-inch MacBook Pro. The 17-inch MacBook Pro is out, I’m not even considering something that big.

Should I get the best?
As a tech junkie it’s always hard for me to not buy the hottest thing available. In the computer world you always pay a premium for the newest, fastest machine. But you know you’ve got the most badass thing you can get. My roommate works for Google and gets a free MacBook Pro for work. I have the opportunity of getting a better one 🙂

I have an itch to get the fastest machine I can get with the most RAM I can get. So now I’ve got to control my desire and hold off on buying a $3,200 laptop (most expensive MacBook Pro config I could get) until I consider whether it’s actually worth it.

As I see it I have 3 options:

  1. $1,756 – 13-inch black MacBook @ 2 Ghz
    2.0 Ghz, 2 GB RAM, 120 GB drive
    The best non-Pro MacBook available. 2 GB RAM through Apple is only slightly more expensive than doing it through an external vendor, so it’s worth the convenience.
  2. $2,393 – 15-inch MacBook Pro @ 2.16 Ghz
    2.16 Ghz, 3 GB RAM, 120 GB drive
    Includes $355 RAM upgrade from Crucial (one two-gig stick).
  3. $2,893 – 15-inch MacBook Pro @ 2.33 Ghz
    2.33 Ghz, 3 GB RAM, 120 GB drive
    The fastest processor with the most RAM I can get. Includes $355 RAM upgrade from Crucial (one two-gig stick).

[Note: these prices include an educational discount I get for being an employee of Stanford University, and they all include the extended AppleCare plan.]

I’m currently leaning towards option #2, but trying to determine if it’s worth $640 more than option #1. There’s a part of me that wants to jump at the 2.33 Ghz version just because, but is that really worth an extra $500? I can buy a lot of booze for $500.

Hard drive
I’ve got a 600 GB external drive, so I’m not putting a priority on the internal drive space. I’ve got 50 GB on my current Windows disk that I’m going to transfer over with Parallels Transporter. So I figure I can deal with a 120 GB disk just fine.

RAM
Each of those options has the most RAM you can stick into the machine. The 13-inch MacBook can only have a max of 2 GB. The 15-inch Pro can have a max of 3GB. Something sneaky is that you can’t order the 2.33 GHz machine with one one-gig stick of RAM (but you can for the 2.16 GHz machine). I can get a 2GB stick from Crucial for $355. This means if I get the 2.33 GHz machine, I end up with one one-gig stick that I don’t use. Versus the 2.16 GHz machine allows me to only order one-one gig stick, so I’m not paying for something I’m just going to throw away (I’ll pretend I’d try to sell it on ebay, but I know I’m too lazy). Another option would be to just get 2 GB of RAM instead of 3. I’m definitely going to get at least 2. My current Windows laptop has 1 GB and when I run Flex Builder in Eclipse, Flash 9, Photoshop, and Illustrator all at the same time it gets a little unhappy. So if I want 3 GB of RAM that pushes me toward the 2.16 GHz MacBook Pro. Is it worth it? I don’t know, I suppose I could always upgrade later.

Display considerations
I like high resolutions, even on small screens. The 1400 pixel wide resolution on my current 12-inch screen is awesome. I’m young and have good eyesight at close range, so I like the screen real estate and don’t have trouble reading the small text. The 13-inch MacBook has a resolution of 1280 x 800. The 15-inch Pro has a resolution of 1440 x 900. And obviously the Pro version’s screen is physically larger. This pushes me toward the 15-inch Pro.

I have a 24-inch monitor that requires that my laptop be able to output at least 1600 x 1050 (which my current laptop was barely able to do, with some tweaking). Both MacBooks can output to high enough resolutions for external displays. The non-Pro can output up to 1920 x 1200, which is enough for me. The MacBook Pro can output a ridiculous max resolution of 2560 x 1600, far more than I need. This one’s a tie.

I was talking to someone at 360Flex and they told me that the non-Pro MacBook can only mirror the screen when using an external display, not extend the desktop. Maybe this used to be true and got an upgrade, because looking at the specs on Apple’s site it says that both the non-Pro and the Pro can do mirroring and extended desktop. While I don’t use my external monitor and my current laptop screen at the same time very often, I do occasionally, and I certainly want that option. I’ll assume the Apple specs don’t lie to me, so this one’s a tie.

So I guess I’ve got to decide if the better display, the slightly faster processor, and the extra gig of ram are worth $640. Or maybe I’ll impulsively buy the fully pimped out 15 incher. If anyone has any thoughts that might help me decide, let me know. And if anyone knows the cheapest (but still reliable) way to get a single 2GB stick of RAM for a MacBook Pro, hook me up.

Standard