If you've ever tried to load a FlashPaper document in Flex 2, then you know it's not as straightforward as it was with Flex 1.5.
Sure, you can just use an <mx:SWFLoader /> tag. But, if you've tried this, you know it's pretty limited. You can't talk to the FlashPaper document, and the loaded document gets stuck at a fixed size or scales incorrectly when resized. If you try fiddling with the various scaleContent and maintainAspectRatio settings, you'll quickly get frustrated trying to achieve the perfect resize behavior.
I've run into this problem in the Flex 2 application I'm currently building. We're using ColdFusion to generate dynamic reports via the <cfreport> tag, capturing the report output as FlashPaper, and then loading the report output .swf directly into the Flex 2 application. I'm happy to say that I've solved the resize and communication issues, and I've been given permission to post these on my weblog from the client that I've written the code for.
You can download my Flex 2 FlashPaperLoader here. (.zip archive) - MIT License
There's a lot of interesting things going on the .zip file. In the archive you'll find the following files:
