Migrating from fla to flex

198 views
Skip to first unread message

sFoster

unread,
Mar 29, 2010, 4:16:00 PM3/29/10
to DC Flex
I've been tasked with converting a flash professional project (fla)
into a flex development environment
Does anyone here have any experience with this problem?

The flash project isn't using any external components, but there are
716 items in the fla library.
Mostly buttons, extending from a custom class, each with highly
graphical skins incorporating layers of images.

Now as I see it, there are two obvious approaches here.
#1 Compile the library elements into a swc, using fck, and add an
external reference to them in my flex project
Issue: Many of those library elements have custom .as files as their
base class. If I export into a .swc, all of the base classes stack
into that swc, cascading into an include for every other file
referenced by the base classes as well. This is a big problem, because
it encompasses almost the entire project as a whole. every time a bit
of code needs to be changed it would have to happen in flash CS4,
which of course defeats the purpose of migrating to flash builder.
Perhaps I could massively refactor the project architecture to avoid
these extra references..

#2 Go through by hand and rebuild the visual elements in mxml
Issue: obviously time consuming, although out of 716 library elements
I would estimate only 200 or so need to actually be exported into
their own class.. but still

Having said all that, this seems like a pretty raw deal either way. Am
I missing anything?
The fla and flex formats aren't that different from one another!!
Migrating shouldn't be this much of a hassle

I've been brain storming other solutions, like possibly do an export
from CS4 into a swc, and then using a flash decompiler to strip out
the classes I want to port into flex.. but my approach is running out
of optimism.

Thoughts? Helpful Links?
Thanks for reading

- Sean

sFoster

unread,
Mar 30, 2010, 6:14:38 PM3/30/10
to DC Flex
Yes! Looks like I finally had one of my solutions bear fruit!
With my current route, It'll probably take 40 man hours with a project
of this size, but if I had to recreate all those symbols by hand it
would have been more than a month (of mind numbing labor)

Kelly Brown

unread,
Mar 30, 2010, 10:47:17 PM3/30/10
to dc-...@googlegroups.com
Please share with the class.

-Kelly

--
You received this message because you are subscribed to the Google Groups
"DC Flex" group.
To post to this group, send email to dc-...@googlegroups.com.
To unsubscribe from this group, send email to
dc-flex+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/dc-flex?hl=en.

sFoster

unread,
Mar 31, 2010, 1:46:32 PM3/31/10
to DC Flex
Sure thing. Wasn't going to take the time typing it out unless I knew
somebody was interested in reading it.
The trick boils down to the external-library-path option for the
actionscript compiler

Build a full swc in CS4
Create a flex project, consisting of all the actionscript classes, add
the swc as an external reference (if this doesn't work, then create
empty dynamic movie clip classes in the public namespace as a
placeholder for the library elements)
You might need to massage the as3 classes some here to get them to
compile - they don't need to actually run, just compile into a swc

The point is to have a library with full class definitions that your
CS4 project can use to compile against as an external reference

Create a copy of the original project in cs4, but delete all of the
actionscript classes, and add the swc that you created with flex
builder.
This will allow all of the library classes to compile against the
external reference, but not actually package them into the swc. Then
use fck to convert them all to flex, and publish to a swc.

Create another flex project, consisting of all the actionscript
classes, and then add this latest swc as a reference.
the swc library class definitions will be created at design time,
based off the .as classes which are declared as the various components
parents.

You can change the parent classes, and it will directly affect all of
the library elements in the swc from cs4
There are some other details and bumps along the way, but this was the
major chasm.

Reply all
Reply to author
Forward
0 new messages