23
Feb

For a recent client project, we were having an issue with using superscript to display the number next to a disclaimer information. In HTML this is accomplished by simply wrapping a <sup> tag around the text. For example: "<sup>1</sup> The client wants a disclaimer here." looks like:

1 The client wants a disclaimer here.

However, Flash does not support superscripts or subscripts in HTML text out of box, so a "hack" of some sort needed to be applied

Looking around I found two solutions. The first is fairly old (2007/2008) and uses a combination of some regular expression magic to convert <sup> and <sub> tags into HTML <font> tags. The solution next used an extra set of embedded fonts that were created for superscirpt and subscript. Here is the  blog post for reference. 

This solution is a reasonable but requires the process of embedding two extra fonts into the application to get the desired result. 

The second approach was to use the Text Layout Framework (TLF) in Flex 4 and take advantage of the baselineShift property to create subscript and superscript text. See this Adobe blog for reference. 

read more...
22
Nov

A while back, a friend of mine and fellow Flex developer was consulting on a Flex 4 based application.  He was having a troublesome issue where in some cases the skin state was not updating in his application when he called invalidateSkinState().  The problem was that when he called invalidateSkinState(), the getCurrentSkinState() was never called during the next commit properties phase (think validation during maturity, eee our whitepaper for more details). It wasn't consistent in the code and it only happened in a few specific cases. 

He asked me if I had ever seen the issue where getCurrentSkinState() is skipped after calling invalidateSkinState(). At that time I had never seen a problem with the Skin state not updating, so I didn't have much guidance for him.  He found a solution which involved making sure to call both invalidateSkinState() and invalidateProperties() at the same time, even though invalidateSkinState() should also invalidate properties for you.

About three weeks later, I stumbled upon the same issue while working on an application.  Inexplicably, one of my components started ignoring invalidateSkinState() and the skin wouldn't change.  After setting some breakpoints and screaming at the code for a while I finally figured out what the cause was.  I had mistakenly used invalidateSkinState() within the commitProperties() after calling super.commitProperties():

read more...
18
Nov

At Max one of the most interesting announcements was around the BlackBerry PlayBook.   The new device presents a slick 7'' screen and is packed with a 1GHz dual core processor and 1GB of RAM. The device will run BlackBerry's Tablet OS and come stocked with developer's favorite runtimes. Those include Open GL, WebKit, SMP, Adobe Flash, Java, and Adobe AIR.

For us Flash developers, the most important specs are that the device will ship with Flash 10.1 and with Adobe Air 2.5. This means all Flash content on the web will be viewable via the latest WebKit. And Flash developers can take advantage of the Blackberry Tablet OS SDK and a Flash Builder plugin to create ActionScript based projects. The SDK seems to be a custom version of the Flex 4 SDK, but from what I understand, they do not recommend you use the Flex 4 component set. BlackBerry has created their own core set of ActionScript components for general use and to assist with developing custom components that are performante on the device.  

The SDK does support Flex's resource bundles, which means, your application can take advantage of internationalization. This is an important feature considering  the PlayBook will be released in multiple countries in 2011.

read more...
28
Sep

Flex 4 has introduced a new preloader and with it a series of new events that we can leverage.  I am not going to take much time explaining how to build a preloader, there are some solid examples out there to cut your teeth on. The first example is Adobe's official documentation.

read more...
16
Aug

Flash in the Can (FITC) is almost upon us (or already happened depending when you read this) and we are really excited to be attending the San Francisco version of this internationally renowned conference.  Aaron and I will speaking on the first day about the Flex 4 component lifecycle and if you are attending the conference we highly recommended swinging by and saying hi.

For attendees we will be handing out a conference code for a 20% discount off our training program, so keep an eye out for our flyers.  There should also be a copy of the flyer in your goodie bag.  If you are not attending FITC, we have a twitter contest going on.  If you tweet about our training with the keyword #devarc you will have a chance to win a free session.  So, get out there and tweet!

read more...
9
Jul

We are proud to announce that DevelopmentArc is introducing a new training program focusing on Flex 4 development.  Each training session will be a live seminar hosted online using Adobe Connect.  We will offer our seminars multiple times each month, hopefully providing a good window for anyone who is interested.  Our sessions also include unique training materials that are provided to you after each session.  These materials include the source code we demonstrate with, a PDF copy of the slides and any custom training material we are creating for each series.

read more...
3
Jun

Over the last few weeks we have been rebuilding DevelopmentArc.com using Drupal as our new platform.  Prior to the switch over, we having been running Wordpress and it has been pretty good for the last year or so.  Unfortunately, we had purchased a template system that worked well for the launch yet to make it work we had to heavily modify the template and the CSS.

When Wordpress updated to 2.9, this broke all of the tempting systems and the developers had to roll out a new version.  This new roll out drastically changed a lot of the files that we had modified, and this caused us a lot of heartache trying to re-build our modifications in the new template framework.  We are currently planning a Drupal site for a client and we felt that rebuilding our site in Drupal was the perfect exercise.  Small enough to do it between other work and would also free us up from the previous template fiasco since we would be building it from the ground up.

Now that we have ported over to Drupal, our goal is to keep the site in parity to the first one.  Hopefully, you won't even tell a difference.  But now that we control the entire stack, we hope to roll out new content and updates on a much shorter timeline.  That, and we are finally wrapping up our book which has been our main focus for all our work and personal free time.  So, enjoy the "new" site and let us know what issues you all have!

read more...
17
Feb

DevelopmentArc @ 360|Flex

With a little less than a month until 360|Flex I thought I would sit down and write a long over due post about the conference.  360|Flex is known in the community as one of those “hard core” conferences where the expectation is to leave sessions with your Flex and Flash IQ increased by a couple digits.

Unfortunately until now, James and I have had to experience the conference through other people’s stories.  For some reason or another the last few years have been pretty hectic, but we made it a mission in 2010 to attend and speak at more events, with 360|Flex being the first on the list.

read more...
24
Nov

I found an interesting trick with embedding fonts today while working with the Text Flow engine in Flex 4.  What I found out is that you can embed multiple fonts under the same font family name, but set the properties such as font weight or font style to different settings based on the font source you are using.  This may be an obvious thing to a lot of people, and the property name 'font-family' makes a lot more sense now, but for me it was a real 'ah-ha' moment.  By the way, this isn't just a Flex 4 thing, you can do this with Flex 3 and probably AS3 only projects (haven't tried that yet) but the issue became more apparent in Flex 4's new TLF enabled components.

The problem came about because we have a set of fonts that provide each style type in a unique OTF file, i.e. Font-Regular.otf, Font-Bold.otf, Font-Italic.otf, and Font-BoldItalic.otf.  In the past, we just embedded this with unique font-family ids (font-family: "Font-Regular") and then just bound them via CSS.  This approach becomes a significant problem when starting to work with TLF's selection management and Text Format.  We are building a simple Rich Text Editor in Flex 4 (since its not available yet in Beta 2) to allow a user to set their text to bold, italic or underline.  Simple enough, right?

read more...
23
Oct

In part one of the Flash Player Internals recap we covered how the player is built, in part two we talked about how the player infrastructure works, in part three we examined how ActionScript and the Virtual Machine (VM) are improving in Flash Player 10.1.  Now, in the final segment (looking at my notes this will be the longest segment) we will look at how the Flash Player rendering system is being improved and how you can leverage it for multiple devices.

Shake Your Movie-maker

One of the biggest changes in player 10.1 is that all video will now be GPU decoded.  This is huge for you video buffs out there because GPU decoding is sick fast and allows lower power devices, like netbooks, to play 1080p video smoothly and efficiently.  In the current player, video is decoded using a software based decoder (except in fullscreen, when GPU may be used, but not guaranteed) which is fine when you are on a big 8 core beast, but little machines just can't handle the data.

Now, with a change this big there has to be a few caveats.  Well, there is.  First, your GPU has to support H.264 decoding in the chipset.  If your GPU (ex: video card) doesn't support that, then you are out of luck and the Player will fall back to software decoding.  Next, your GPU and GPU drivers have to be certified for the Player to use it.  If you have an older driver that is not certified it won't matter if your chipset supports H.264 or not, the Player won't leverage it.

read more...