test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" x="0" y="0" width="703" height="609" xmlns:ns1="*" >
<mx:Script>
<![CDATA[
import flash.events.*;
// stuff
private function onUncaughtError(e:UncaughtErrorEvent):void {
//Do Stuff
}
This gives:
apitester.mxml 1046: Type was not found or was not a compile-time constant: UncaughtErrorEvent. /apitester/src line 35 Flex Problem
According to Adobe it is available in flex and Air.
The Flex 4/Eclipse build path shows:
Flex 4.0
- playerglobal.swc
- textLayout.swc
- osmf.swc
- framework.swc
- spark.swc
- sparkskins.swc
- rpc.swc
- datavisualisation.swc
- flash-integration.swc
- flex.swc
- utilities.swc
Any ideas?
You need the Flex 4.1 SDK.
See: http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/
Also you need to specify to the flex compiler that you are require flash player 10.1 (not the minimum version required by the SDK which is 10.0) because earlier versions of the flash player do not support this.