Flex is not Flash
Posted by caseyrayl on August 10, 2007
The Fisix engine that I mentioned in a previous post is actually distributed as a Flex 2 compiled library. Much to my dismay, I learned that this library is not compatible for use in a Flash CS3 movie and it doesn’t seem like a compatible library will be forthcoming anytime soon. For my project, we didn’t want to give up the engine, so that meant finding a way to build an animated “conventional” style Flash movie in Flex.
The entire dilemma, as well as the research required to find a solution, really illustrated to me how different the Flex and Flash products really are. Before now I had built Flash movies, and Flex applications, but I had never tried to use Flex as a development environment for a Flash movie. I had heard so many times that “Flex is Flash” that I was under the assumption it would all just work. I was so young, so naïve.
The problem is that normally when embedding external swf assets into a Flex application, you have no control over or access to the timeline that might have been in the asset. Adobe’s solution to this is apparently the Flex Component Kit. This extension to CS3 allows you to export a Flex compatible swc that houses your assets in class form. They extend a new Flex class called UIMovieClip which can operate as a Flex component as well as provide access to the timeline. The component kit got my project back on track, so I am grateful to Adobe Labs for providing it, but there are still issues with it and how Flash and Flex coexist.
First of all, the component kit is prerelease software. I haven’t noticed any serious bugs with it, although I have had trouble embedding Flex exported components in the timeline of other Flex exported components. I have had to do that in code. Secondly, the documentation is provided in a zip file. This beats no documentation at all, but I sincerely hope this gets moved into the api for Flex 3. I don’t enjoy hunting around my disk when I want to look at the properties of UIMovieClip. My last and most important gripe about the component kit is that it is distributed as an extension. This functionality needs to be a baseline of both the Flash and Flex products. I don’t want to jump through hoops to make these products interoperate. Make it easy, make it seamless.
Now after complaining about the current state of affairs, I do see good things on the horizon. There is a presentation linked on the component kit page that describes some of the ways they are improving the integration of Flash and Flex 3. I think they are steps in the right direction and I will probably migrate to Flex 3 sooner rather than later.
-Casey
Adam said
Actually the Flash Component Kit isn’t the only way to get content into Flex – what with skinning and building your own UIComponents it’s a little more complicated, but still very doable.
Which is what people mean when they say Flex IS Flash