Text Layout Framework Follow Up and Request

UPDATE: I’ve posted a solution to this PureMVC + Text Layout Framework integration here (this applies not just to PureMVC, but anywhere you want to use your own “undo” stack in an MVC application). I’m having a bit of a tricky time with integrating the TLF into an application which already has an “undo” system. The TLF has itself an UndoManager, but more on that later… The public demo’s are all quite concise, showing the functionality of the TLF in a small amount of code, but I wonder if it’s possible for someone at Adobe to take a look at how people might be using the Text Layout Framework when they have implemented their own application-wide Undo stack which I believe is quite common for RIAs now. ...

February 19, 2009

Introduction to the Text Layout Framework

I’ve been using the TLF for the last day, and it’s really a major leap forward from the limitations of the TextField class introduced in Flash 6. TextField still has its uses, it’s most likely more processor friendly (unconfirmed). But if you’re in need of some of TLF’s advanced features like bi-di text (or complex script like TCY elements), support for flowing text between multiple columns and containers, better handling of in-line images, advanced styling of things like ligatures, superscript, and tracking, then TLF is for you. ...

February 18, 2009

The View-Model-ViewModel Pattern

Yes, another pattern, but I’ve just come across a great post on the M-V-VM pattern and it’s a good one to share. I was introduced to the V-M-VM pattern just under a year ago by an outstanding .NET dev when we worked together on an RFID/database powered WPF application (pics), and I have to admit it worked *really* well, I was utterly convinced by this concept with regards to WPF developement. (Link to article at the end of this post.) ...

February 16, 2009

CSS and AS3: Careful with Whitespace

Small bug here, it looks like the built in StyleSheet CSS parser in Flash doesn’t use a trim() or a more complex regular expression when parsing a CSS string/file. If you’re a whitespace fan this can lead to your style properties, such as “fontFamily”, actually being indexed in the style object as “fontFamily ” (notice the space at the end). This doesn’t affect the regular dot notation access (style.fontFamily). But it can cause problems if you’re iterating through the style object. ...

January 23, 2009

Cliff Hall on PureMVC – Video

I’ve got a stack of posts scribbled over some paper that I’ve been meaning to blog about for months now regarding the MVP pattern (and ViewModels). But more on that later, because what is core to MVP is of course MVC, that most misunderstood of “patterns”… Well this one is for new-guns and MVC vets alike, Cliff Hall presents on MVC as it is applied in PureMVC, perhaps one of the most refreshing frameworks to come to light in the Flash realm, and it is spreading to many other languages, ports include Python and even JavaScript/JQuery in the works. ...

December 19, 2008

Genetic Algorithm Evolves Better Car Using Flash

Caught this over at BoingBoing, it’s a nice Flash-based simulation that runs through rapidly evolving a vehicle design, using a physics engine to test the thing out over some terrain (not sure whether it’s home-rolled or one of the big ones). Quote from BoingBoing article, from Matthew the author: “This is a GA I wrote to design a little car for a specific terrain. It runs in real-time in Flash. The fitness function is the distance travelled before the red circles hit the ground, or time runs out. The degrees of freedom are the size and initial positions of the four circles, and length, spring constant and damping of the eight springs. The graph shows the ‘mean’ and ‘best’ fitness.” ...

December 9, 2008

Flash Player Settings: Flash and Silverlight Comparison

One of the little pet peeves I seem to share with other Flashers is the frankenstein-like html/flash settings manager pages that you have to access via Adobe’s site. This is the thing you see when you right click a Flash movie and choose “Settings” -> “Advanced”. It allows you to trust certain locations on your hard drive, delete “Flash cookies” (LSOs) , auto-check for player updates and other tasks. The thing is this thing really looks and feels old now (it’s an FP6 file and it shows), it seems strange I have to be online and visit a site to delete files the Flash Player creates on my hard drive… if it’s a chore for a Flash dev, what’s the chance someone else can use it, particularly if people are storing sensitive info in there (bad devs!). I just got pinged a link to a Silverlight site and as I had to update to 2.0.something so I thought I’d check out the new settings panel (below, click to view full size): ...

October 29, 2008

getDefinitionByName() Fails in SWFs Loaded Into Another SWF (Solution)

Just a quick note for future reference. When you are using getDefinitionByName(“ClassName”) inside a SWF that is being loaded into another SWF, it might not find the symbol from its own library (see ApplicationDomain and LoaderContext for why). The solution is to get a reference from the ApplicationDomain of the SWF being loaded using the getDefinition() method. So the code: var mySymbol:Class = getDefinitionByName("MySymbol"); becomes… var mySymbol:Class = loaderInfo.applicationDomain.getDefinition("MySymbol"); Hopefully that resolves any issue you had with getDefinitionByName(). Of course you’d use a similar mechanism to work the other way around, and get at classes inside a loaded SWF. In this case it would be loader.contentLoaderInfo.applicationDomain.getClass()… however this depends on what ApplicationDomain you’ve loaded your child SWF into (see LoaderContext class). ...

September 8, 2008

ActionScript and ECMAScript 3.1/4 – Inter-op is the Key

Like many other Flash devs I’ve been following the discussions surrounding the ECMAScript 4 decisions and the Harmony project quite closely. There are a few bloggers out there that appear to be stating that ActionScript will become divorced from the standards. To be honest only Adobe can decide that, but either way, that’s only half the story. In particular, it does not mean that ActionScript will not be able to inter-op, and that’s key… ...

August 15, 2008

Meta4orce – Papervision Site for the BBC

I just caught this site via the blog of Iain Lobb (head of interactive at Bloc Media) who commented on my last post. It’s an incredibly slick site developed using the Great White branch of Papervision3D. The site is (for) a TV and online cartoon series, providing a nice cross media experience. The main things that stood out for me were the production quality of the games and the audio which is very high quality and just as importantly, very well integrated. ...

August 6, 2008