Flash Player 10.1 Global Error Handling Examples and the Flex 3.x Issue
We all welcomed this addition to the Flash Player 10.1. The ability to catch all exceptions inside the player has lots of benefits, from proper logging on to…
We all welcomed this addition to the Flash Player 10.1. The ability to catch all exceptions inside the player has lots of benefits, from proper logging on to not annoying users that has the debug player.
There are some code examples of how to implement this feature, and indeed it was a breeze adding it for pure Flash and to Flex 4.x projects. But, somehow I had trouble making it work for Flex 3.x project. I know it's a player dependent but still something in the Flex 3.x framework killed this functionality.
Anyhow, eventually it did worked for me on the Flex 3.x, but I couldn't make it to work when even 1 of the libraries, except playerglobal.swc, is****external or RSL. I guess there is no escape from monkeying with the RSL loader to see if I can find a solution there.
I've mad these examples available, in case you need a complete example and/or also struggling with this feature on Flex 3.x. Also, in these examples I didn't force the user to update the Flash Player and used a compiler argument -target-player=10.1.0 instead of modifying the html wrapper.
All examples are viewable here, you can right-click on "View Source" or download the complete Flash Builder 4 projects (for Flex Builder 3 project, look at the comments).
Note: No need for the FP 10.1 playerglobal.swc to be inside *C:Program FilesAdobeAdobe Flash Builder 4sdks4.1.0frameworkslibsplayer10.1 *I've put it inside the libs folder.
Related Posts
Comments (6)
Imported from the original blog
can't open fxp with flex builder 3
The fxp projects are for Flash Builder 4
You can download a Flex Builder 3 compatible project from here:
http://guya.net/blogstuff/g...
Download the zip and import it into your workspace.
This project is using the Flex SDK 3.5, if you don't have it installed you can use whichever 3.x that you have.
To change the SDK version
Right click on the project folder -> Properties -> Flex Compiler
Also, in the same tab, under "Additional compiler arguments" make sure you have this:
-target-player=10.1.0
The issue is reported at https://bugs.adobe.com/jira... .
And there I added a workaround: grab the loaderInfo from the rsls.
Thanx Wouter, I will try it.
Guess you'll have to do it for modules as well.
I think you accidentally changed the html wrapper version.
It's very interesting article as I'm looking for a way to use global exception handling in Flex 3.x application.
However, in my case when I recompiled GEH Flex 3.5 application an exception is not handled. To fix the issue I removed all libraries except playerglobal.swc one from the project and of course there is "-target-player=10.1.0" settings. GEH Flex 4.1 application works fine.
Could you point where the issue could be?
Thanks in advance