Export / Convert Flex application to HTML5 - flex4.6

Please help!!! I have application generated in Flex (mxml). Now I need to export as HTML 5 but no success. Is there any software or technique to export Flex?
Thank you.

Try FlexJs, FlexJS is a new application development framework that cross compiles MXML, more info here: FlexJs introduction

Related

How to use the htmlWrapper in Flex4?

How to use htmlWrapper in Flex4?
How do you code your flex applications? If you use Flex Builder, it's automatically generated.
Otherwise, there are also a ANT task and a FlexMojos goal.
If you want to create it manually from scratch, look at the official documentation : http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ba8.html

Moving Flex MXML Application into Flash

is it possible to move a flex mxml project into flash?
i have the project complete in mxml with actionscript but due to the fact that flex is limited in its visual animations ( no timeline! ) i would prefer to switch to using flash.
the project is relatively huge, all done in mxml and i cant just re-create it in flash, it will take months!
what do you think? is there a conversion ability or a use of flex component inside flash? if so, how?
Thanks.
There is no conversion utility, but as noted in the comments you can build your animation in the Flash authoring tool and import it to Flex (Flash Builder.)
The way you do this will depend on what type of animation you're trying to do. If it's just a simple path or the animation of some type of built in shape you'll want to export the animation to FXG to easily import it into Flex. Select the object you're trying to export and hit file->export->Export Selection. In the export window select "Adobe FXG" as the export format. Try this article for more information.
If you're building an animation that needs to be controlled via scripting or is more complicated you'll need to export it as Flash content (SWF or SWC are fine.) Then load the object in to your Flex application dynamically and script it accordingly. Be aware that cross-swf scripting security issues may arise if you use a swf loaded at run time.
You might consider converting the Flex project into a Flex library project and placing the resulting swc into the class path of the Flash project.

Generate UML from Flex Projects

Are there any good tools to generate UML class diagrams using the source code from a Flex Builder project? I have been trying IntelliJ but for some reason it generates the inherited class structure from the SDK and not everything below my main app.
You could try UML4AS - UML for ActionScript and Flex.
You may have a look on the following program:
Commercial:
http://www.sparxsystems.com/products/ea/index.html
http://www.visual-paradigm.com/support/documents/vpumluserguide/12/13/5963_aboutvisualp.html
Free:
Using StarUML to Generate ActionScript 3.0
Edit: 29 May
http://www.uml4as.com/flower-platform/ the alpha version can be download now.
I think the best option for now is to use Crocus Modeller, UML for Flex & AS3

Is there any fl.control.* classes that exist in Flex AS3?

The internet says to add
import fl.controls.Combobox
But Flex says that there is no class called fl.controls
Which is the equivalent class in flex?
You cannot import fl.* classes to a Flex application, and you cannot import mx.* classes to a Flash application - those are platform specific if you will. Only flash.* classes can be used irrespective of the platform.
Use the flex combo box as already suggested, or export the flash combo box to an SWC and give it a shot.
This shouldn't be an issue if you're using Flex as just an editor - that is if you're not compiling your AS files using Flex. The only problem would be that you won't get auto-complete for fl classes. You can just ignore the flex errors and compile it using flash.
mx.controls.ComboBox

How about using FLEX 3 component inside Flash file?

Is it possible to use Flex 3 component/code inside Flash (cs4) SWF file ?
I know its possible in the opposite direction.
With my minimal testing it seems you can't use Flex components when building a "pure AS3" project. (Can we start calling it PAS3 or something? Like "passé". Or "pastry". :)
I did this admittedly limited testing by creating a test project with one AS class as the "document class", which would instantiate and addChild one mx.controls.Button. I copied the whole mx package from the path mentioned by hasseg into the project source path.
This is what I found out:
By removing the use of mx_internal from a certain Version.as file, I got Flash IDE to compile my test project without warning. Nothing showed up on the stage though.
Using Flex Builder (and the flex compiler, obviously) I also managed to compile the project without errors. I put breakpoints in the code and watched it build itself in the debugger. The components were instantiated flawlessly, but still nothing showed up on the stage. This swf also crashed the browser numerous times.
I haven't used Flex code in a "pure AS3" project myself, but I don't see why you couldn't do that.
You can download the Flex SDK and get the Flex components from there, both as an swc file (under /frameworks/libs) and as AS3 source code (under /frameworks/projects/framework/src).
It looks like this can be done after all: http://labs.wichers.nu/2007/12/25/using-flex-compiled-code-within-flash/
In general you need to use MXML to initialise the Flex framework and use Flex components.
Mike Chambers from Adobe says:
There is not support for using the Flex Framework in an AS only project. While it is theoretically possible, you would have to manually bootstrap a lot of the application initialization code that Flex handles (something which would be rather complex). - Source
To see how complex, you can tell the compiler to keep the intermediate AS3 files that it generates from the MXML. Open your AS3 project properties and set -keep-generated-actionscript as an argument to the compiler. Compile your project then look in the obj/generated folder. Using Flex 4, I get 13 small files the main of which extends spark.components.Application and overrides a few methods.
So it's possible but you probably wouldn't want to do it. Flex is meant to make your life easier, not harder.

Resources