开发者

com.adobe.indesign::IDSWFFile : Null-exception when loading swf-files

This is my class in essence

import mx.controls.Image;
public class ImageFrameView extends Image
{
    //Model. Contains x, y, z and z. Url for the png/jpg or swf-file
    private var m_imageFrame:ImageFrame;

    public function ImageFrameView(imageFrame:ImageFrame)
    {
        super();
        m_imageFrame = imageFrame;
        initFrameView();
    }

    private function initFrameView():void
    {
         maintainAspectRatio = false;
         width    = m_imageFrame.width;
         height   = m_imageFrame.height;
         开发者_运维技巧x        = m_imageFrame.x;
         y        = m_imageFrame.y;
         rotation = m_imageFrame.rotation;           
         source   = m_imageFrame.url; //Url points to a handler on the same server which serves images and/or swf-files.
    }
}

And it's used like this in a class SpreadView which extends UIComponent

var imageFrameView:ImageFrameView = new ImageFrameView(contentFrame as ImageFrame);
addChild(imageFrameView);

Png and Jpeg works fine. And swf-files which I export from Indesign CS4 or Indesign CS5 works fine aswell. But recently,older swf-files which have been exported using the same method and parameters (in Indesign CS4) and which used to work, have suddenly refused to load and I get the following error, when UpdateDisplayList is called for the ImageFrameView:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com.adobe.indesign::IDSWFFile/readConfigurationData()
    at com.adobe.indesign::IDSWFFile()

What happens is that the loaded swf-file throws an exception when it tries to read its own configuration.

All swf-files that I've created past and present still work. All swf-files that clients have created created past and present - doesn't work even tough they worked in the past. As far as I know the swf-files is created using the same method and parameters.

Can there be some sudden change in Adobe Flash that I'm not aware of? Me and my client is using Flash 10.1 or higher. Where does the error orgin from?


It seems like it is page transistions and/or page curl was the culprit. I don't know why but when I ticked off the options for page transistions the error vanished when the pdf is loaded. As such features is meaningless in my app I will make sure that such options is disallowed when the clients exports swf-files from indesign.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜