Flex 4 -Type not found or not a compile-time constant: Matrix3D
I had a friend ping me tonight and ask me a Flex 4 question. So I whipped up a quick demo to see if I could provide an example. I was quickly stunned to find that I had an error in my project regarding the Matrix3D class.
“1046: Type was not found or was not a compile-time constant: Matrix3D Unknown Flex Problem”
Now typically this error means you have missed an import in one of your classes, but this particular error was not found in my code. I did a quick google search and found the answer to my problem.
Of course when I set up my project I did not change the target version of Flash Player. So now that the Flex framework has been updated to make good use of these new classes that are only available in the FP 10 release, my code had errors.
So should you come across this problem the solution is easy. Thanks to ShortFusion for posting the fix.

Is it a bug? HTML Wrapper should not change the compiler options, isnit?
Its not a bug. My Flex Builder project was set to target Flash Player 9 which does not include the Matrix3d class. Once I changed the target for the compiler, Flex Builder included the correct libraries and all was well.
You are correct, changing the html wrapper does not change compiler options. But actually changing compiler options in the project properties does.
Thanks
=Sim
The link you gave to the solution is not working… can u help?
The solution is actually just to change the version of flash player that your project targets to version 10. Right click on the project in flex/flash builder and choose properties. Then you can change that value in the Compiler screen.
HTH
sim
This did the trick. Thanks.
You are a genius. In my experience, Flex is sometimes very bad at telling the operator what is actually wrong. This has taken me ages of hunting, and all I had to do was visit here. Thanks Sim.
Thank You!!