Flash-Flex Integration: Editing Flash Code in Flex Builder (free article)
The latest in the Flash-Flex Integration series on Community MX, this tutorial shows you how to use Flex Builder as an ActionScript 3.0 editor for Flash-compiled projects. It also delves into techniques, best practises and caveats in using Flash and Flex Builder together in the same editing workflow.
This one was just too good to keep to ourselves, so we made this tutorial available free to the community. You can read the tutorial and download the PDF and all source files here.

The Flash CS3-Flex Builder 3 Workflow

Flash Actions panel or Flex Builder: for code editing, there is no contest.
Flash-Flex Series on CMX: Flash S9 Skinning for a Flex DragPanel Component
In part 3, part 4, and part 5 of the Flash-Flex Integration Series on Community MX, we show you how to build a scale-9 skin in Flash, apply it to a custom Flex component, and build a draggable, resizable “panel” component application in Flex. You can see the finished demo for this tutorial trilogy below.
The skin was designed in Flash CS3, and implemented in Flex Builder 3. To find out how this was done, you can purchase these tutorials at the links below.
Flash-Flex Integration - Part 3: Flex Component Skinning with Scale-9
Flash-Flex Integration - Part 4: Skinning the Scale-9 Flex Component
Flash-Flex Integration - Part 5: Building the DragPanel Component
Flash-Flex Integration - Part 3: Flex Component Skinning with Scale-9 on Community MX
I’ve a few new articles on the Flash-Flex Integration series on Community MX. This latest article is part one of two about creating a custom Flex component skin using Flash CS3 along with some deft scale-9 techniques and gotchas.
In this first article, we will design a skin in Flash CS3 for a Flex component, which is able stretch intelligently using a concept known as scale-9. We will look at several techniques for designing assets in Flash using scale-9 effectively, avoiding certain important gotchas along the way. We will also demonstrate how one Flash skin file may be applicable to multiple Flex components. In the following article we will implement this skin for a Flex custom panel component with drag and resize handles.
Flex Skin Design Extension for Flash CS3 ReferenceError 1056 Workaround
This week while writing a tutorial for the Flash-Flex Integration series, I came across this very strange error whenever I tried compiling my Flex project using a skin which had a boundingBox clip on the timeline, using a Button skin template in the Flex Skin Design Extension for Flash CS3:
at flash.display::Sprite/constructChildren()
at flash.display::Sprite()
at flash.display::MovieClip()
at mx.flash::UIMovieClip()[E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:467]
...
Unfortunately this error occurs whenever you place any kind of MovieClip (and I suspect any non-drawing object as well) on the timeline.
The solution, it would seem, is to simply declare the object on the skin timeline:
Which seems very odd to me, given that UIMovieClip is a dynamic class.
Just to verify for myself that this was true, I placed the following code on the timeline:
- import flash.utils.*;
- trace("class: "+describeType(this).@name+"\nextends: "+describeType(this).@base+"\nis dynamic: "+describeType(this).@isDynamic);
Which, sure enough, returned
extends: mx.flash::UIMovieClip
is dynamic: true
This is very puzzling to me. I’ve logged a bug on the Adobe JIRA bugbase. I’m hoping they patch it soon or release a technote; people using the extension should be aware of this issue, or much tearing-out-of-hair may ensue.
Update 2008-04-18: Just discovered that Jesse has found the same bug, and it’s not really a bug but a quirk of the Flash compiler not automatically declaring class instances on the stage.
My guess is that this error is appearing because normally when you associate a class linkage with a MovieClip in the library, you need to declare your stage instances, as automatic stage object declaration is turned off. Same here, except the class associated with that container is UIMovieClip, which is not a custom class where you can place your object definitions. I still think there needs to be a mention in the FCK documentation about this.
As soon as I saw Jesse’s post I smacked myself in the head proclaiming “Of course!”
Some weeks are just like that.
Flex Builder 3 Startup JVM Termination Error
So I just installed a new version of my firewall software, and now neither FB 2 or FB 3 will start. I get a JVM termination error popup, that’s it. As fortune would have it, Neil Webb had blogged about the same problem just today. So I looked up the issue on the Adobe bugbase, and there I found the answer after a little investigation.

Turns out I had some JVM performance tuning set in my shortcut.
…and apparently it was too high. The moment I ran FlexBuilder.exe directly or the shortcut with a lower max mem at -Xmx768m , it worked, no problem. I found I could push it all the way up to 958m, but no more. At 959m, it crashes, just as before.
No idea why installing new software would affect the maximum memory allocation for the JVM, or why a max of 958. But at least it’s working now.
\*replaces hair torn out of scalp\*
Update 02-04-2008: logged an official bug with the Adobe JIRA bugbase
Flash-Flex Integration: New Article Series on Community MX
I’ve just started a new article series on Community MX all about strategies and techniques for implementing an integrated Flash-Flex workflow. Which is to say, using Flash objects and classes to be compiled into a Flex SWF application, or Flex objects and classes compiled into a Flash SWF application.
Despite some very excellent articles on Adobe Devnet, the information that’s out there can be a little confusing, and there are a lot of niggly things to keep track of, and many possibilities to explore regarding integrating Flash assets into a Flex application, or Flex assets into a Flash application. So I started this new series as a way of exploring that seldom ventured “grey zone” between the Flash and Flex development workflows.
The series kicks off with a high-level discussion on workflows, to be followed in the coming months with tutorials for implementing specific techniques.

A bird’s eye view of the Flash-Flex workflow
Like all my series on Community MX, the first one is free, and the rest are available for a pittance or at a subscription rate.
The Professional Flex 3 Book is Now In Session
Well, after much planning, and searching, and a few hiccups, our team line-up for the upcoming Professional Flex 3 by Wrox is finally established.
We’ve got a phenomenal team line up, consisting of Andrew Trice, Peter Ent, Joe Berkovitz, Tom Suggden, Todd Prekaski, David Hassoun, Jun Heider and myself.
We’re all very excited about this book, and the reason for so many authors is that this book aims to be the next Bible for Flex, something long overdue for such a wide-ranging and complex ecosystem of technologies, and as such it will be fairly massive and very comprehensive. Some of the advanced topics to be covered in this book will be Cairngorm, LCDS & Blaze DS, Flex Video, Advanced Flash Integration, VM1/VM2 Communication, Application Optimization, PHP/Java/.Net Integration, Automation Framework, FlexUnit, Logging Framework, Stress Testing Framework.
All I can say is, THIS IS GOING TO BE SO FREAKING AWESOME!!!! (okay, so i’ve been spiking my own kool-aid, so what?) :)
We’ve already got a fair number of volunteers to help us beta test the code for the book so that it comes out squeaky clean, but if you’ve got an advanced understanding of ActionScript and/or Flex development, and you’re interested in becoming a “beta tester” or tech reviewer for the book, drop me a line at jbdesign - at - joeflash - dot - ca.
PS: the Amazon listing for this book is incorrect, of course — jumping the gun with a photoshop job of the last title so they can pre-pre-presell the book ;)
Flex Powertools: Explorers article on Community MX
I’ve a new article on Community MX entitled Flex Powertools: Explorers, in which I review over 20 of my favourite Flex 2 and 3 explorer utilities and resources, which includes component explorers, styling & skinning explorers and resources, visual effects explorers and benchmark explorers.
Professional Flex 3 book (calling all Flex writers!)
I’m very excited. I have just been handed the lead authorship role on the upcoming Professional Flex 3 title by Wrox/Wiley Publishing. No release date has been set, but it’s estimated to be out in the summer of 2008.
We are in the process of getting together a “dream team” of experienced Flex writer/developers for this project, and I just wanted to open up the process to anyone out there who may want to help write an important Flex 3 reference title.
The goal of this title is to be a very comprehensive, in-depth overview of the Flex ecosystem of technologies, and I am looking for people with good writing and communication skills and experience building visually expressive and/or data-oriented applications in Flex. If you have the passion, the chops and the time to help write this book, or think you might and you have a few questions, drop me a line at jbdesign-at-joeflash-dot-ca.
Feel free to pass on the word to any experienced Flex developers you know who may want to get involved.
Thanks!
