views:

585

answers:

2

Ill try to explain the best i can :)

I want to use the strengths of both Flex and Flash in an upcoming project. Doing the graphical related stuff in Flash and all the coding in Flex.

What i want to do is create a layout in flash making classes as you would normally by creating symbols and exporting them for actionscript etc. Then i want to export them as a SWC and edit all the classes in Flexbuilder. A CustomButton symbol is given a CustomSymbol.as ie.

However i cant really get it to work. Searching the net suggest that you extend the classes in the SWC which will give the same functionality. This however wont work if i got nested layouts. Since the components laid out in flash are not of the same type.

I somehow want to directly get in control of the Classes in the SWC.

Any ideas ?

+2  A: 

I don't think you can directly access the AS3 code of a *.swc file, unless you hack at it.

I suggest using the "Design Mode" in FlexBuilder so as to be able to create layouts without having to worry about using Flex's MXML. I think this is the workflow that you desire; however, the code that it will produce will not be AS3 it will be MXML from my experience.

http://livedocs.adobe.com/flex/3/html/help.html?content=intro%5Fworkbench%5F4.html

Luis B
A: 

We are testing a workflow similar to the one that you describe:

  1. Our designer work in Flash and create the layout and elements
  2. In Flash he exports each element as a swc library
  3. Developers put them in the libs directory of out ActionScript Project inside FlexBuilder
  4. Developers instantiate objects using them like normal classes. They can even access properties and identifiers defined inside Flash

You can't see the code inside SWC but in general designer doesn't export code but only graphic elements (images, videos, MovieClip instances)

wezzy
The workflow works good when not creating nested components. If i create a Symbol, ButtonManager_gfx and use it to create the actual class ButtonManager.as by extending the gfx i will lose the possibility to layout additional custom components inside Flash. If the ButtonManager_gfx has children of the type ButtonOne_gfx it will not work since the gfx classes wont have the code to work properly.This workflow should be possible... somehow =)
Lollertits