Apache – How about using FLEX 3 component inside Flash file

apache-flexflash

Is it possible to use Flex 3 component/code inside Flash (cs4) SWF file ?

I know its possible in the opposite direction.

Best Answer

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:

  1. 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.
  2. 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.
Related Topic