I’ve been playing with the Flex Component Kit for Flash CS3, and it looks pretty cool. I have run into a couple of issues, however.
One issue has to do with the bounding box feature which – in theory – works as follows: When you create a new Flash CS3 file that is to be published as a Flex component, the Flex layout managers treat it as though it is the full size of the Flash stage (which still has the same age-old default of 550 x 400). In order to avoid this, you create a rectangular movie clip of the size that you want the component to be, and give it an instance name of boundingBox. However, in actual practice this does not work if your component includes GIF images that are larger than the bounding box: the portion of the GIF that is outside of the bounding box shows up in the Flex application. Not cool.
The other issue has to do with Flex Builder’s code-hinting and code-complete features. Even though my Flash SWC had all of the appropriate frame labels, Flex Builder didn’t help me out with any code hints for currentFrame. Call me spoiled, but I like it when the IDE helps me out with the spelling of arbitrary language and framework names.
In spite of these disappointments, I’m liking the possibilities here; it looks like it will help to build even cooler UIs. And according to Adobe it’s going to get a whole lot better with Flex 3 – but I’m not going to let myself get too distracted with Flex 3 until Flexmaniacs is over.
I’ve put together an extremely simple demo – simple enough that I think it should be self-explanatory. However, these things always seem simpler to the author than they do to anyone else, so feel free to post any questions or issues that arise. I hope to take the demo a step or two further, and will make the results of my experiments available with future posts.
- Click here to view the demo app. When it loads, right-click on it to view and download the source.
FYI
I’ve only built one small app in Flex 2 but about a week ago I migrated it to Flex 3. (ie: created new project in Flex3, copy/pasted my MXML code, then moved copies of my asset: embedded font swf, skins, etc.)
Everything worked smoothly. There have been a couple of random crashes. But I had these in Flex 2. And they are very infrequent. I did notice the design mode seems to take a bit longer to compose itself. But this may also be due to the fact that I’ve added more objects as well.
I did encounter one strange occurrence where Flex3 failed to publish on save for an app. I simply re-created the MXML application and that resolved it. So I am chalking up to being just a fluke…perhaps file corruption. But haven’t had a problem since.
Have not noticed any significant differences between the two.
Thanks for the nice example and the heads up on some gotchas.
thanks for this, i really wanted to look at another example.
one thing i cant get straight, does the flashCS3component only allow the symbols to be used as components in flex,
for eg: u have a symbol that entails everything and you call that in flex. Is there no other way ?
nicii – I’m not sure whether this addresses your question, but I’ve posted a more complex sample here.