For those of you, like moi, who have been confined to the outer fringe–limited to sneak peaks–of updates regarding the upcoming player and IDE (Flash is apparently one hot chick when it comes to beta testing); today, is a very good day. Our first chance to taste the future has arrived in the form of the Flash Player 8 Public Beta. The new player has me drooling at the possibility of getting my hands on the updated ActionScript API’s–I’m particulary eager to play around with runtime effects and the new ECMAScript 4 xml handling capabilities. For now, I’ll have to be content on seeing just how many components I can instantiate at once before the new player gets cranky…if only I could lure Nigel Pegg out of blog retirement to chastise me for my foolishness.
Great v2 component resources keep coming to my attention following my initial Creating Custom Components blog entry of two weeks ago. Greg Hammer, Manager of the Las Vegas Macromedia Users Group, turned me on to an excellent tutorial on creating custom v2 architecture components which is made available courtesy of laflash.org (User Groups Rock!!). As Greg pointed out, this is a fairly unknown resource–I had never seen or heard of it and I’ve looked under a lot of v2 rocks over the last year and a half–which was posted about 6 months ago. The presentation by Jacob Bullock runs nearly an hour, so be prepared to to clear your schedule for some component clarity (presentation focuses on entry / intro to v2 component architecture and incidentally covers many basic fundamentals of AS2.0 development) .
Peter Hall just setup a new open source project on the OSFlash wiki called Ripple. Ripple is a framework for developing Flash movies that allows search engines to easily index and deep link flash content. Low rankings and the inability to take advantage of SEO (Search Engine Optimization) techniques, or even consultants for that matter, has always been one of the major drawbacks to Flash content on the Web–I’ve personally had clients, as I’m sure you have, sour on Flash because of its SEO limitations. Its extremely exciting to see a push being made in this direction–definately a project to keep an eye on.
There’s been a bit of traffic on the flashcoders mailing list today about how to create custom components extending the UIComponent class. Jesse Warden droppped a link to some really excellent step-by-step tutorials (click here for tutorials, click here for source files) which walk you through the entire process from start to finish. Not only are the tutorials excellent and walk you through some of the more common pitfalls of component development (I know I personally have less hair) , but you also get a taste of JesterXL’s lingo which adds a bit of flava to the learning process (my favorite from this session is how he emphasizes the second syllable in “init” which makes it sound as though you are in the middle of something rather than initializing something). Anyways, Jesse is an excellent resource for the community and deserves many kudos. Taken together with Chafic Kazoun’s excellent series of articles on Ultrashock the community now has a very detailed set of tools to assist the component development process. I know I speak for many others in saying thank you to Jesse and Chafic for the time and effort they put into these tutorials.
A friend of mine, and fellow flasher, from the Pacific Northwest IM’d me yesterday about creating a custom cell renderer for a ComboBox. What he wanted to do was deliver a custom icon for each item based on the SCORM objective results returned from the LMS. After thinking about his need for a couple of seconds I remembered a method of the List component which is probably not the most intuitively named–setPropertiesAt().
Now you might be asking yourself what this method has to do with a ComboBox and and custom icons? The answer of course, is that the ComboBox contains a List component which it uses for its drop-down menu. The “dropdown†property of the ComboBox provides a reference to this List which means that we can enjoy all of the fun properties and methods provided by the List without having to fool around with extending it.
This is where setPropertiesAt() arrives on the scene. The setPropertiesAt() method takes two arguments: 1) the index of the item whose properties you wish to set and 2) an object enumerating the “backgroundColor†and “icon†properties. This provides us with an easy way to drop an item specific icon or background color into a List cell, or a ComboBox dropdown cell for that matter, by simply providing the linkage ID of a MovieClip icon or hex number for the background color:
comboBox.dropdown.setPropertiesAt(0,
{backgroundColor:0xCCCCCC icon:"passedIcon"});
It also serves as a reminder of how important method names are to an API. The setPropertiesAt() method makes perfect sense after the context is set and understood, but is not very intuitive for someone searching for the means to set an icon or background color in a List cell.
One of the more useful features of the Eclipse platform is the organizational capabilities it gives you. In particular, Working Sets allow you to group your projects together in logical categories or sets. What’s really nice is that a project can belong to more that one Working Set which allows you enormous flexibility in how you classify and work with projects. For example, I’ve broken my projects into Java and Flash sets and “work” and “experimental” sets as well as a catch all “all projects” set. One thing to keep in mind is that you can use Eclipse and its powerful organizational capibilities with projects which are not related to coding at all. As an example, I use Eclipse at the office to organize all RoboHelp Documentation Projects. I’ve included a Captivate movie which walks you through setting up a working set, or you can follow the steps below.