Adobe Air nasty problem: there seems to be no way to catch TypeError: Error #1009 when loading a Swf
Super dad movies No Comments »I am working on a Air application that loads external swf’s.
The problem is that there seems to be no way to catch unhandled exceptions that occur in the loaded swf files. This is really annoying in the development process (everytime I have to click on popups) and also not very good in runtime because you really want to report problems in these external swf’s.
The popups do not occur when deployed to a non-debugging application, so I guess I have to except this and stop moan about it, but if there is a way to catch it I really would like to know it, so that’s why I make a blogpost. You can comment using your Twitter Oath authentication.
This is the error that popups everytime I run the application that loads the swf file using SwfLoader;
TypeError: Error #1009: Cannot access a property or method of a null object reference. at exceptionTest_fla::MainTimeline/frame1()[exceptionTest_fla.MainTimeline::frame1:2]
[Frame1]
var textfield:TextField;
textfield.text = “test”;
And here’s the testcode that’s in the Air app, it’s very minimalistic, but it’s just for testing.
It catches with the type Error and also with TypeError






Recent Comments